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).
Use a chave pública de sandbox abaixo para testar a API sem criar conta. Rate-limit 60 pedidos por minuto, respostas idênticas à produção mas não faturadas.
tvx_sandbox_public_demo_key_read_onlySandbox⚠ A sandbox é apenas leitura e pode ser desativada sem aviso. Para uso duradouro, crie a sua própria chave via /profil/api (plano Free: 10 000 pedidos/mês).
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": "llama3.1-8b", "provider": "cerebras", "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 usa por defeito Cerebras (Llama 3.1 8B, fallback Groq Llama 3.3). Se configurou uma chave BYOK OpenAI/Anthropic no seu perfil, será usada automaticamente. Limite: rate-limit tier da sua chave API (Free: 10/min, 200/dia).
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,
classeEnergie: asset.epc,
etat: asset.condition,
})),
}),
}
);
const { results, succeeded, failed } = await response.json();
console.log(`${succeeded}/${results.length} assets estimated`);