Skip to main content

Health Endpoints

System status and monitoring.

GET /api/health

Basic system health check.

Authentication: Not required

Response:

{
"status": "operational",
"uptime": "2h 30m 45s",
"uptimeSeconds": 9045,
"memory": {
"used": "45MB",
"total": "128MB",
"rss": "156MB"
},
"providers": {
"available": ["openai", "anthropic", "google", "grok", "openrouter"],
"count": 5
},
"models": {
"total": 30
},
"cache": {
"size": 150,
"valid": 120,
"expired": 30
},
"timestamp": "2025-12-17T18:00:00.000Z"
}

GET /api/health/status

Detailed provider status with connectivity test.

Authentication: Not required

Cache: 30 seconds

Response:

{
"status": "healthy",
"providers": {
"openai": {
"provider": "openai",
"status": "healthy",
"latency": 254,
"tested": true,
"lastCheck": "2025-12-17T18:00:00.000Z",
"model": "gpt-5-mini"
},
"anthropic": {
"provider": "anthropic",
"status": "healthy",
"latency": 198,
"model": "claude-sonnet-4-20250514"
}
},
"summary": {
"total": 5,
"healthy": 5,
"degraded": 0,
"averageLatency": 320
}
}

GET /api/health/metrics

Detailed system metrics.

Authentication: Not required

Cache: 60 seconds

Response:

{
"status": "operational",
"system": {
"platform": "linux",
"nodeVersion": "v20.10.0",
"pid": 1234,
"cpu": {
"user": 1234567,
"system": 234567
},
"loadAverage": [0.5, 0.4, 0.3]
},
"uptime": "2h 30m 45s"
}

POST /api/health/check

Force a complete health check without cache.

Authentication: Not required

Response: Same as GET /api/health/status with "forced": true