# Errors and retries

Find recovery steps by HTTP status or error code.

## Recover from an API error

Errors look like `{"error": {"code": "insufficient_credits", "message": "...", "request_id": "req_..."}}`. Read `error.code` for the cause and keep `error.request_id` when you contact support (contact@fingerdance.ai). Use the original idempotency key when retrying a submission whose result you did not receive.

| Status | Code | What to do |
|---|---|---|
| 400 | `invalid_idempotency_key` | Supply an `Idempotency-Key` with 1–128 ASCII letters, numbers, or the characters `_ . : -`. |
| 401 | `unauthorized` | Send a valid Bearer API key. Sign in again if you are using the console. |
| 402 | `insufficient_credits` | Check available credits. Add a pack or lower `max_duration_seconds` before retrying. |
| 403 | `permission_denied`, `organization_unavailable` | Check the key's workspace and permissions. |
| 404 | `not_found` | Check the resource ID and the workspace that owns it. |
| 409 | `idempotency_conflict`, `replay_conflict`, `stream_not_ready` | Reuse the original input with the same key; use a new key for a new request. If the stream is not ready, check the job status first. |
| 410 | `artifact_expired` | Generate a new video if the artifact has expired. Reopen the job for a fresh URL if only the download link expired. |
| 413 | `request_too_large` | Reduce the request body before sending it again. |
| 422 | `invalid_request` | Correct the fields listed in the error response. |
| 429 | `rate_limited`, `queue_limit`, `stream_limit` | Wait for `Retry-After`. Let pending jobs finish or close unused streams if you hit a capacity limit. |
| 503 | `maintenance`, `media_unavailable`, `identity_unavailable`, `payment_unavailable` | Retry temporary failures later with the same idempotency key. |

## Failed jobs

A job that ends `failed` carries `error_code` and is not billed: its whole reservation is released. `text_not_translatable` means the text could not be turned into signs (for example it contains no words); change the text. Other codes are transient: submit again with a new idempotency key.
