Guides · Errors and limits
Errors
Status codes, the one error envelope, and the health endpoint worth monitoring.
| Code | What it means |
|---|---|
| 400 | Malformed request. model and messages are both required |
| 401 | Missing, revoked or malformed API key |
| 402 | Credit balance exhausted, or the key hit its monthly budget cap or its limit |
| 403 | The account or the key's workspace hit its budget, or your data policy rules out every route for the model |
| 404 | Unknown model. GET /models lists what is available |
| 429 | Over the per-minute limit, or too many requests already in flight |
| 500 | Something failed on our side. The message carries a request id to quote when reporting |
| 502 | The upstream provider failed or could not be reached |
| 503 | We list this model but its provider is not connected on this deployment yet |
Every error, a 500 included, is the same envelope: { "ok": false, "error": { "code", "message" } }. Internal detail (stack traces, database errors) never appears in a response body; a 500's message contains a request id that maps to the full detail in our logs.
Monitoring us
GET /health answers if the process is up; GET /health/inference additionally runs the same database queries a chat completion runs and answers 503 when that path is broken. If you page on our availability, ping /health/inference, it is the one that tells the truth about whether inference works.