Skip to main content

Health Check

System status and monitoring endpoints. No authentication required.


GET /api/health

Basic system health check.

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": 38
},
"cache": {
"size": 150,
"valid": 120,
"expired": 30
},
"timestamp": "2026-01-17T18:00:00.000Z"
}

GET /api/health/status

Detailed status of each provider with connectivity test.

Cache: 30 seconds

Response:

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

GET /api/health/metrics

Detailed system metrics including CPU, memory, and performance.

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 using cache.

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