Vai al contenuto
GET /v1/meta

Spec

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/bac-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

curl "https://api.oanor.com/bac-api/v1/meta" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/bac-api/v1/meta", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/bac-api/v1/meta");
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/meta",
    headers={"x-oanor-key": "oanor_test_..."}
)

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "note": "Per mille (‰) = g alcohol / (r · kg). BAC % ≈ ‰ ÷ 10.",
        "service": "bac",
        "constants": {
            "widmark_r_male": 0.68,
            "widmark_r_female": 0.55,
            "ethanol_density_g_per_ml": 0.789,
            "default_elimination_permille_per_hour": 0.15
        },
        "endpoints": {
            "/v1/drink": "Standard-drink calculator: alcohol grams, US standard drinks, UK units and EU drinks from volume + ABV.",
            "/v1/sober": "Time until BAC falls to zero or a target limit from a current value.",
            "/v1/estimate": "Estimate peak and current BAC (‰ and %) from drinks, body weight, sex and time elapsed."
        },
        "disclaimer": "Rough estimate for education only — never use to decide whether it is safe or legal to drive. When in doubt, do not drive.",
        "description": "Blood-alcohol estimation via the Widmark equation, with standard-drink and time-to-sober helpers."
    },
    "meta": {
        "timestamp": "2026-06-03T17:42:00.548Z",
        "request_id": "a5fcd281-0fd0-4903-9614-b7e1327c8a30"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}