Errors
The API uses conventional HTTP status codes and returns a consistent JSON error body.
Error shape
Section titled “Error shape”{ "error": { "type": "invalid_request_error", "code": "missing_parameter", "message": "The 'email' parameter is required.", "param": "email" }}Status codes
Section titled “Status codes”| Code | Meaning | What to do |
|---|---|---|
200 |
Success | — |
400 |
Bad request — malformed or missing parameters | Fix the request; check param. |
401 |
Unauthorized — missing/invalid API key | Check your API key. |
402 |
Payment required — out of credits | Top up credits / check your plan. |
403 |
Forbidden — key lacks permission | Use a key with the right scope. |
404 |
Not found — unknown resource (e.g. job id) | Verify the id/path. |
422 |
Unprocessable — valid syntax, invalid values | Correct the field values. |
429 |
Too many requests | Back off; see Rate limits. |
5xx |
Server error | Retry with backoff; contact support if it persists. |
Error types
Section titled “Error types”type |
When |
|---|---|
invalid_request_error |
The request was malformed or missing data. |
authentication_error |
The API key was missing or invalid. |
rate_limit_error |
You hit a rate limit. |
insufficient_credits |
The account is out of credits. |
api_error |
Something went wrong on our side. |