Error response format
The gateway returns a unified error format:
HTTP/1.1 400 Bad Request
{
"error": { "message": "model is required", "type": "invalid_request_error" }
}
Generation errors
| HTTP status | type | Meaning |
|---|---|---|
| 400 | invalid_request_error | Invalid parameters (e.g., missing model, stream and task both true) |
| 401 | authentication_error | Invalid API Key |
| 403 | forbidden | API Key IP allowlist rejects current IP |
| 404 | not_found_error | Model not found or no available routes for current mode |
| 502 | upstream_error | Server error |
Task query errors
HTTP/1.1 404 Not Found
{
"error": { "message": "Task not found", "type": "not_found_error" }
}