Skip to main content

Common status codes

StatusMeaningWhat to do
200Request succeededNormal response
400Invalid request parametersCheck JSON format, request body, and parameters
401Authentication failedCheck that the API key is correct and not expired
403Access deniedConfirm the API key group can access the requested model and endpoint; check the client protocol and Base URL
404Endpoint not foundCheck the request URL
413Request body too largeReduce the request body size and retry
429Rate limit reachedSlow down requests, check console announcements, or inspect current limits
500Internal server errorRetry later and keep the request ID and error message
503Service temporarily unavailableThe model may lack capacity or an upstream provider may be unavailable; retry later or switch models
524Request timeoutCheck network conditions or reduce request size before retrying

Error response format

{
  "error": {
    "message": "Error description",
    "type": "error_type",
    "code": "error_code"
  }
}

Retry guidance

  • 4xx errors: fix the request before retrying.
  • 429: wait before retrying; use exponential backoff for automation.
  • 5xx errors: wait a few seconds, then retry.