Chargement...
Chargement...
Especificação OpenAPI 3.1 pública — endpoints, esquemas, exemplos.
Cada pedido deve incluir a sua chave API. Dois cabeçalhos aceites:
# Option 1 — X-API-Key header
curl https://www.tevaxia.lu/api/v1/estimation \
-H "X-API-Key: tvx_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"commune":"Luxembourg","surface":90}'
# Option 2 — Authorization Bearer
curl https://www.tevaxia.lu/api/v1/estimation \
-H "Authorization: Bearer tvx_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"commune":"Luxembourg","surface":90}'Gere as suas chaves API em /profil/api (criação, revogação, seguimento de uso 30 dias).
Esta chave pública permite testar endpoints disponíveis no nível Free. A quota é partilhada por todos os utilizadores na mesma instância do servidor: 10 pedidos por minuto e 200 por janela de 24 horas.
tvx_sandbox_public_demo_key_read_onlySandboxA disponibilidade depende da quota restante e do serviço. Esta chave não permite exportar faturas nem importar observações PMS. Para uso individual, crie uma chave em /profil/api; não é garantida uma capacidade mensal separada.
Dois endpoints IA acessíveis com a sua chave API tevaxia (rate-limit tier standard):
# POST /api/v1/ai/analyze
curl https://www.tevaxia.lu/api/v1/ai/analyze \
-H "X-API-Key: tvx_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"context": "Commune: Luxembourg\nSurface: 90m²\nEstimation: 950000 EUR",
"prompt": "Comment this estimate vs market."
}'
# → { "text": "...", "model": "gemini-3.6-flash", "provider": "gemini", "remaining": -1 }
# POST /api/v1/ai/chat
curl https://www.tevaxia.lu/api/v1/ai/chat \
-H "X-API-Key: tvx_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{ "role": "user", "content": "How is LU 3% VAT computed?" }
]
}'
# → { "text": "...", "model": "...", "provider": "...", "remaining": -1 }O servidor tenta os fornecedores gratuitos por ordem: Google Gemini 3.6 Flash, depois Groq e Cerebras se as suas chaves estiverem configuradas — passa automaticamente ao seguinte em caso de falha. Se configurou uma chave BYOK no seu perfil, esta tem prioridade. Limite: rate-limit tier da sua chave API (Free: 10/min, 200/dia).
As estimativas individuais e em lote utilizam o mesmo contrato: apartamentos em plena propriedade, parâmetros opcionais e valores predefinidos documentados em OpenAPI. Os exemplos usam pressupostos explícitos a adaptar ao imóvel. Campos desconhecidos, booleanos textuais e chaves de ajuste não reconhecidas são recusados. Um lote pode ter sucesso parcial: verifique cada resultado. O método utiliza uma referência municipal e ajustes não validados estatisticamente, sem certificação TEGOVA ou CRR.
const response = await fetch(
"https://www.tevaxia.lu/api/v1/estimation/batch",
{
method: "POST",
headers: {
"X-API-Key": process.env.TEVAXIA_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
items: myPortfolio.map((asset) => ({
commune: asset.commune,
surface: asset.surface,
typeBien: "appartement",
estNeuf: false,
parking: false,
nbChambres: 0,
classeEnergie: "D",
etage: "adjEtage2e3eRef",
etat: "adjEtatBonRef",
exterieur: "adjExtBalconRef",
})),
}),
}
);
if (!response.ok) throw new Error(await response.text());
const { results, succeeded, failed } = await response.json();
console.log(`${succeeded}/${results.length} assets estimated`);