Errors and retries
Diagnose HTTP failures and safely recover interrupted submissions.
Error responses
Task API failures return an HTTP error status and a JSON object with string code and message fields. Preserve X-Request-ID when contacting support.
| HTTP | Code | Retry? | Action |
|---|---|---|---|
| 400 | invalid_params | No | Correct the request against the model's inputs. |
| 401 | unauthorized | No | Check or replace the API key. |
| 402 | insufficient_balance | No | Check the account balance and recharge. |
| 403 | access_denied | No | Check account access and model entitlements. |
| 404 | not_found | No | Check the task ID and account ownership. |
| 409 | conflict | No | Check the idempotency payload or model revision. |
| 429 | concurrency_limit / rate_limit | Yes, after Retry-After | Back off and wait for available capacity. |
| 500 | internal_error | Yes, with the same idempotency key | Preserve diagnostics and retry. |
| 503 | service_unavailable | Yes, after backoff | Back off and check service availability. |
Retrying recordInfo is always safe. For createTask, follow the idempotency rules below before retrying anything.
See for the Retry-After header and backoff guidance.

