# Errors, limits & safe retries

Separate HTTP rejection, uncertain submission and a completed task failure. They need different recovery actions.

## HTTP errors

Errors use an error object with code; origin responses also include request_id. Keep that ID, task ID and timestamp for support. Never send your API key with a support request.

| HTTP/code | Meaning | Action |
| --- | --- | --- |
| 400 invalid_idempotency_key / invalid_or_unpriced_model_configuration | Input does not match a priced contract | Fix parameters using model docs |
| 401 invalid_api_key / invalid_or_restricted_api_key | Missing, expired, disabled or restricted key | Check key settings and limits |
| 403 invalid_origin | Cross-origin browser request | Call from your backend |
| 404 task_not_found | No task visible to this key | Use the submitting key and exact task ID |
| 409 idempotency_conflict | Same request key reused with different input | Recover the original request; use a new key only for intentionally new work |
| 409 model_configuration_changed / price_configuration_changed | Saved configuration changed | Refresh catalog and review price |
| 409 model_temporarily_unavailable | No eligible execution route | Wait; do not assume another model is equivalent |
| 413 body_too_large | JSON exceeds 64 KiB | Reduce request size |
| 415 json_required / encoding_not_supported | Invalid body encoding | Send uncompressed application/json |
| 429 rate_limited | Request limit exceeded | Wait at least 60 seconds, then back off |
| 502 / 503 service_unavailable | Temporary or uncertain service result | GET: retry; POST: preserve key/body |

## Rate limits

The task service currently applies 60 requests per minute per API key across submit/query/list operations, and a shared platform limit. Polling consumes requests too. These limits are not a concurrency guarantee and may change. Use exponential backoff with jitter for transient reads.

## Asynchronous failure

An accepted request may later fail because of funds, model restrictions or execution errors. Customer errors are intentionally sanitized; task_processing_error is not a reliable retry instruction. Check task and usage records. needs_review is never a signal to automatically duplicate the request.
