Error Codes and Status Codes

Error Codes and Status Codes

EasyAPI error codes and HTTP status codes: what 400, 401, 429 and 500 errors mean, an OpenAI-style error response example, and retry and troubleshooting tips.

The HTTP status code indicates the error category. The response body may contain an error object (with fields such as message, type and code, compatible with the OpenAI style).

Common errors

HTTP statusError codeDescription
400invalid_request_errorInvalid parameters or missing required fields
401invalid_api_keyMissing or invalid API key
429rate_limit_exceededRequest rate or quota limit exceeded
500server_errorInternal server error; retry later

Error response example

{
  "error": {
    "message": "Invalid API key provided",
    "type": "invalid_request_error",
    "code": "invalid_api_key"
  }
}

Handling recommendations

  • 401: check the Authorization header and whether the key is valid
  • 429: retry with exponential backoff, or increase your quota
  • 500: record the request id (if present) and contact support