Chargement...
Chargement...
Ëffentlech OpenAPI 3.1-Spezifikatioun — Endpoints, Schemaen, Beispiller.
All Ufro muss Äre API-Schlëssel enthalen. Zwou akzeptéiert Header:
# 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}'Är API-Schlësselen verwalte sech vun /profil/api (Erstellung, Revokatioun, 30-Deeg Notzungssuivi).
Benotzt de ëffentleche Sandbox-Schlëssel hei drënner fir d'API ouni Kont z'testen. Rate-limitéiert op 60 Ufroen pro Minutt, Äntwerten identesch mat der Produktioun awer net rechnungsfäeg.
tvx_sandbox_public_demo_key_read_onlySandbox⚠ D'Sandbox ass nëmme liesen an ka ouni Virwarnung deaktivéiert ginn. Fir laangfristeg Notzung erstellt Äre eegene Schlëssel iwwer /profil/api (Free-Plang: 10.000 Ufroen/Mount).
Zwee IA-Endpoints accessibel mat Ärem tevaxia API-Schlëssel (Standard-Rate-Limit):
# 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 }De Server benotzt par défaut Cerebras (Llama 3.1 8B, Fallback Groq Llama 3.3). Wann Dir e BYOK OpenAI/Anthropic-Schlëssel an Ärem Profil konfiguréiert hutt, gëtt dësen automatesch benotzt. Limitt: Rate-Limit-Stuff vun Ärem API-Schlëssel (Free: 10/Min, 200/Dag).
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`);