API Errors
Check the HTTP status before reading the body. Errors use the same envelope with English keys; match on error.code, never on the human-readable message.
| Status | What to do |
|---|---|
| 400 | Check parameters and input formats. |
| 401 | Check that your API key is present and valid. |
| 404 | Check the route and the requested identifier. |
| 429 | Wait for Retry-After before retrying. |
| 5xx | Retry with capped exponential backoff. Contact support if it persists. |
Handle quota and credit errors separately from transient failures. When credits run out, check your dashboard balance instead of retrying.