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/caffeine-api

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

Ottieni una chiave API

Frammenti di codice

curl "https://api.oanor.com/caffeine-api/v1/meta" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/caffeine-api/v1/meta", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/caffeine-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/caffeine-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": "First-order decay with a default 5-hour half-life. Informational only — caffeine half-life varies widely (≈3–7 h, longer in pregnancy or with some medications). Not medical advice.",
        "service": "caffeine",
        "endpoints": {
            "/v1/level": "Remaining caffeine (mg and %) after a time, and hours to reach a threshold.",
            "/v1/sources": "Caffeine per serving for common drinks, or the total for a drinks list.",
            "/v1/timeline": "Hour-by-hour caffeine decay and the time until it is 'sleep safe'."
        },
        "description": "Caffeine metabolism maths: remaining caffeine over time (half-life decay), a decay timeline with a sleep threshold, and caffeine content of common drinks.",
        "default_half_life_hours": 5
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:17.644Z",
        "request_id": "41857f96-a27b-4c00-aef8-28a192f654a2"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}