Errors

Error codes and troubleshooting for the Developer API.

Error Format

All errors return a consistent JSON format:

{
  "error": {
    "type": "insufficient_credits",
    "message": "You need 6 credits but have 2.",
    "code": "credits_insufficient"
  }
}

HTTP Status Codes

400invalid_request

Invalid parameters or missing required fields

401authentication_error

Missing, invalid, or revoked API key

402insufficient_credits

Not enough credits for the request

403forbidden

Account suspended or no active subscription

404not_found

Resource not found or doesn't belong to your account

429rate_limit_exceeded

Too many requests. Check Retry-After header.

503service_unavailable

Generation service temporarily unavailable