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 statustypeMeaning
400invalid_request_errorInvalid parameters (e.g., missing model, stream and task both true)
401authentication_errorInvalid API Key
403forbiddenAPI Key IP allowlist rejects current IP
404not_found_errorModel not found or no available routes for current mode
502upstream_errorServer error

Task query errors

HTTP/1.1 404 Not Found
{
  "error": { "message": "Task not found", "type": "not_found_error" }
}