Skip to content

Health

The health endpoint exposes the live health state tracked by the gateway for each configured model. It is public — no authentication is required.

Endpoint: GET /health

Authentication: None

GET https://your-gateway.workers.dev/health
{
"status": "ok",
"models": {
"gpt-4o": {
"provider": "openai",
"healthy": true,
"success_rate": 0.994,
"avg_latency_ms": 820,
"in_cooldown": false,
"cooldown_until": null,
"daily_requests": 3100,
"daily_limit": 10000
},
"claude-3-5-sonnet-20241022": {
"provider": "anthropic",
"healthy": true,
"success_rate": 0.964,
"avg_latency_ms": 1140,
"in_cooldown": false,
"cooldown_until": null,
"daily_requests": 2800,
"daily_limit": 5000
},
"llama-3.3-70b-versatile": {
"provider": "groq",
"healthy": false,
"success_rate": 0.621,
"avg_latency_ms": 490,
"in_cooldown": true,
"cooldown_until": "2024-11-15T11:00:00.000Z",
"daily_requests": 1600,
"daily_limit": 2000
}
}
}
FieldTypeDescription
statusstringTop-level gateway status ("ok" or "degraded")
modelsobjectHealth state keyed by model identifier
FieldTypeDescription
providerstringBackend provider for this model
healthybooleanWhether the model is currently accepting traffic
success_ratenumberRolling success rate (0–1)
avg_latency_msnumberRolling average response latency in milliseconds
in_cooldownbooleanWhether the model is temporarily paused due to errors
cooldown_untilstring | nullISO 8601 timestamp when the cooldown expires, or null
daily_requestsnumberRequests made to this model today
daily_limitnumber | nullConfigured daily limit for this model, or null if unlimited

When a model’s error rate exceeds the configured threshold, the gateway places it in cooldown for a short window. During cooldown, the router skips that model and falls back to healthy alternatives. Once cooldown_until passes, the model is re-evaluated on the next request.

A model marked healthy: false with in_cooldown: true will recover automatically — no operator action is needed.

Terminal window
curl https://your-gateway.workers.dev/health