Error Codes

Reference of all API error codes with resolution steps.

400
invalid_request_error

The request was malformed or missing required parameters.

Check your request body and parameters.

401
authentication_error

Invalid or missing API key.

Verify your Authorization header and API key.

402
insufficient_balance

Your balance is too low for this request.

Add credits from the billing page.

429
rate_limit_error

Too many requests. Check Retry-After header.

Back off exponentially: 1s → 2s → 4s → 8s.

500
internal_error

An unexpected server error occurred.

Retry up to 3 times with jitter. Contact support if persistent.

503
service_unavailable

Service temporarily unavailable.

Wait and retry. Check /status for maintenance.

Error Response Format

{
  "error": {
    "message": "Human-readable description",
    "type": "authentication_error",
    "code": 401
  }
}

Retry Strategy

429 errors

Exponential Backoff

1s → 2s → 4s → 8s

5xx errors

Retry with Jitter

Up to 3 retries, random delay

4xx errors

Do Not Retry

Fix the request first