Zum Inhalt springen
GET /v1/meta

Spec

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/caffeine-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

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

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten 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
}