/v1/meta
Spec
Pruébalo en vivo
10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.
Funciona. Consigue una clave API y úsala en tu proyecto.
Obtener una clave APIFragmentos de código
curl "https://api.oanor.com/sleep-api/v1/meta" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/sleep-api/v1/meta", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/sleep-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/sleep-api/v1/meta",
headers={"x-oanor-key": "oanor_test_..."}
)
Respuesta de ejemplo
Una respuesta real de este endpoint, capturada en la última comprobación de estado.
{
"data": {
"notes": "All clock maths is modulo 24h. Times accept 24h ('23:15') or 12h ('10:30 PM'); 'now' uses server local time.",
"service": "sleep",
"endpoints": {
"/v1/nap": "Given a start time, suggest nap lengths (power / short / slow-wave / full-cycle) and end times.",
"/v1/bedtime": "Given a wake-up time, suggest bedtimes ending on a sleep-cycle boundary.",
"/v1/duration": "Given a bedtime and wake time, report sleep duration, full cycles, and cycle alignment.",
"/v1/wake-time": "Given a bedtime (or 'now'), suggest wake times ending on a sleep-cycle boundary."
},
"disclaimer": "Informational only — not medical advice.",
"description": "Sleep-cycle calculator: recommended bedtimes, wake times, sleep duration analysis, and nap planning, based on ~90-minute sleep cycles.",
"fall_asleep_minutes_default": 15,
"cycle_length_minutes_default": 90
},
"meta": {
"timestamp": "2026-06-03T17:42:02.078Z",
"request_id": "43a2769f-9994-42ac-9b74-26039bba472d"
},
"status": "ok",
"message": "Meta",
"success": true
}