/v1/runtime
Battery runtime under load
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/battery-api/v1/runtime" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/battery-api/v1/runtime", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/battery-api/v1/runtime");
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/battery-api/v1/runtime",
headers={"x-oanor-key": "oanor_test_..."}
)
Respuesta de ejemplo
Una respuesta real de este endpoint, capturada en la última comprobación de estado.
{
"data": {
"note": "Runtime = usable energy ÷ load. Usable energy = capacity × depth-of-discharge × efficiency. Real runtime drops under high C-rate, cold and age.",
"input": {
"load_w": 100,
"stored_wh": 1200,
"efficiency": 1,
"depth_of_discharge": 1
},
"runtime": "12h",
"usable_wh": 1200,
"runtime_hours": 12,
"runtime_minutes": 720
},
"meta": {
"timestamp": "2026-06-03T17:41:59.045Z",
"request_id": "a78bbd94-ea92-4dc4-8970-eedd534bd6ef"
},
"status": "ok",
"message": "Battery runtime",
"success": true
}