Errors

Standard HTTP status codes are used to indicate success or failure. In the event of an error, the response body will contain a JSON object with more details.

Error Codes

CodeDescriptionSolution
400Bad RequestCheck your JSON format and required parameters.
401UnauthorizedInvalid API key. Check your Authorization header.
402Payment RequiredInsufficient credits. Please top up your account.
429Too Many RequestsYou are sending requests too quickly. Implement backoff.
500Internal Server ErrorSomething went wrong on our end. Please try again later.
502Bad GatewayThe upstream provider (e.g. Google/OpenAI) is down.

Error Response Format

JSON
{
  "error": {
    "message": "Rate limit reached for default-global-with-image on requests per minute",
    "type": "requests",
    "param": null,
    "code": "429"
  }
}