Zum Inhalt springen
GET /v1/level

Caffeine remaining after a time

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

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "input": {
            "hours": 5,
            "dose_mg": 200,
            "half_life_hours": 5
        },
        "disclaimer": "Informational only — caffeine half-life varies widely (≈3–7 h, longer in pregnancy or with some medications). Not medical advice.",
        "remaining_mg": 100,
        "threshold_mg": 50,
        "metabolized_mg": 100,
        "percent_remaining": 50,
        "hours_to_threshold": 10
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:17.356Z",
        "request_id": "a5138b3e-1557-452d-af6c-f797a8a4da07"
    },
    "status": "ok",
    "message": "Caffeine remaining",
    "success": true
}