Naar de inhoud
GET /v1/meta

Spec

Probeer het live

10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.

Aangepaste headers (optioneel)
api.oanor.com/caffeine-api

Het werkt. Haal een API-key op en gebruik hem in je project.

Verkrijg een API-sleutel

Codefragmenten

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_..."}
)

Voorbeeldrespons

Een echte respons van dit endpoint, vastgelegd bij de laatste 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
}