/v1/estimate
Estimate blood alcohol (Widmark)
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/bac-api/v1/estimate" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/bac-api/v1/estimate", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/bac-api/v1/estimate");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/bac-api/v1/estimate",
headers={"x-oanor-key": "oanor_test_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"data": {
"input": {
"r": 0.68,
"sex": "male",
"hours": 1,
"weight_kg": 80,
"alcohol_grams": 42,
"beta_per_mille_per_hour": 0.15
},
"status": "impaired (over many EU limits)",
"disclaimer": "Rough estimate for education only — never use to decide whether it is safe or legal to drive. When in doubt, do not drive.",
"peak_permille": 0.772,
"current_permille": 0.622,
"peak_bac_percent": 0.0772,
"current_bac_percent": 0.0622,
"legal_limit_permille": 0.5,
"hours_until_under_limit": 0.81,
"hours_until_sober_from_peak": 5.15
},
"meta": {
"timestamp": "2026-06-03T17:42:00.321Z",
"request_id": "e2256413-f403-4fe1-b5e5-0c9ee9e1b4fe"
},
"status": "ok",
"message": "Estimate blood alcohol",
"success": true
}