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
| Code | Description | Solution |
|---|---|---|
| 400 | Bad Request | Check your JSON format and required parameters. |
| 401 | Unauthorized | Invalid API key. Check your Authorization header. |
| 402 | Payment Required | Insufficient credits. Please top up your account. |
| 429 | Too Many Requests | You are sending requests too quickly. Implement backoff. |
| 500 | Internal Server Error | Something went wrong on our end. Please try again later. |
| 502 | Bad Gateway | The 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"
}
}