<!-- https://bobabanana.com/docs/api/errors/ · Every BobaBanana API error code with its HTTP status, meaning and fix. Per-key rate limits, Retry-After handling and when to retry a request. -->

# Error codes, rate limits and retries

**BobaBanana API errors always use the same JSON shape with a stable `code`, a readable `message`, the `param` at fault when there is one, and a link to this page.**

```json
{"error": {"code": "voice_consent_required", "message": "Set voice_consent to true to confirm the voice is yours or you have the speaker's explicit permission to clone it.", "param": "voice_consent", "docs": "https://bobabanana.com/docs/api/errors/"}}
```

## HTTP status codes

| Status | Meaning |
|---|---|
| `200` / `201` / `202` | Success / file uploaded / job accepted |
| `400` | The request is invalid; fix it before retrying |
| `401` | Missing or invalid API key |
| `402` | Not enough credits for this job |
| `403` | The workspace is suspended, or a download link is invalid or expired. A plain-text `error code: 1010` means the request carried Python `urllib`'s default User-Agent: send your own, e.g. `my-app/1.0` |
| `404` | Job, file, asset or endpoint not found in your workspace |
| `405` | The method is not allowed on this endpoint |
| `409` | Conflicts with the current state: an asset without a version, an unfinished job, an idempotency key in use |
| `413` | The request body is too large |
| `422` | A field has the wrong type or is out of range, invalid JSON, or an idempotency key reused |
| `429` | A limit was reached; see `Retry-After` |
| `500` | Something went wrong on our side; retry later with an `Idempotency-Key` |
| `503` | That kind of generation is not available right now; see `Retry-After` |
| `507` | Your workspace's storage is full |

## Error codes

| Code | Status | How to fix |
|---|---|---|
| `missing_api_key` | 401 | Send `Authorization: Bearer bb_...` |
| `invalid_api_key` | 401 | Check the key; it may be revoked |
| `invalid_request` | 400/422 | Read `message` and `param` |
| `invalid_json` | 422 | The body is not valid JSON |
| `not_found` / `method_not_allowed` | 404 / 405 | Check the path and method against the [OpenAPI spec](https://bobabanana.com/docs/openapi.json) |
| `insufficient_credits` | 402 | `required` and `available` say how many credits are missing; see [credits](https://bobabanana.com/docs/api/credits/) |
| `cost_above_max` | 400 | The job would cost more than `max_credits`; `credits_estimate` says how much |
| `workspace_suspended` | 403 | Contact support@dmxmedia.com |
| `idempotency_in_progress` | 409 | The first request with this key is still running, or its reservation was lost to a concurrent request with the same key; retry after `Retry-After` |
| `idempotency_key_reused` | 422 | The key was used for a different request; use a new key |
| `job_active` | 409 | Cancel the job before deleting it, or wait for it to finish |
| `no_webhook` | 409 | The job has no `webhook_url` to replay |
| `webhook_pending` | 409 | A replay was asked for while the job's webhook is still being delivered; replay it once that delivery has finished or failed |
| `file_in_use` | 409 | Delete the file after the job that uses it has finished |
| `invalid_cursor` | 400 | Pass `next_cursor` from the previous page as `before` |
| `fetch_timeout` | 400 | A URL input took longer than the 30 s budget; upload the file instead |
| `too_many_downloads` | 429 | Two downloads are already running for your workspace |
| `network_busy` | 429 | Every URL download worker on our side is busy; retry after `Retry-After`, or upload the file instead |
| `too_many_files` | 429 | Delete uploads you no longer need |
| `queue_full` | 429 | Your workspace has too many waiting jobs; wait for some to finish |
| `storage_quota_exceeded` | 507 | Delete files or jobs you no longer need |
| `invalid_url` | 400 | Use a public `https://` URL |
| `fetch_failed` | 400 | The URL did not return the file with HTTP 200 |
| `file_too_large` | 400 | Images up to 25 MB, audio up to 60 MB |
| `invalid_image` / `invalid_audio` / `unsupported_file` | 400 | Use a supported format |
| `invalid_base64` | 400 | Check the `data` field |
| `wrong_file_type` | 400 | An audio file was given where an image is needed, or the reverse |
| `file_not_found` | 404 | The file ID does not exist in your workspace, or it expired |
| `too_many_references` | 400 | At most 10 pictures; a character asset counts as two |
| `asset_not_found` | 404 | Check the handle with `GET /v1/assets` |
| `wrong_asset_kind` | 400 | Voices go in `voice`; pictures in `assets` |
| `asset_not_ready` | 409 | Approve a version of the asset in the studio |
| `voice_consent_required` | 400 | Set `voice_consent: true` for uploaded voice samples |
| `invalid_voice_sample` | 400 | Use 5 to 30 seconds of one clear speaker |
| `invalid_metadata` | 400 | Up to 16 keys; keys 40 and values 500 characters |
| `job_not_found` | 404 | The job ID belongs to another key or was deleted |
| `link_expired` | 403 | Fetch the job again for a fresh URL |
| `daily_limit_reached` | 429 | Wait, or ask the workspace owner to raise the limit |
| `too_many_active_jobs` | 429 | Wait for running jobs to finish |
| `motion_unavailable` | 400 | Motion transfer cannot be made for the workspace now; the message says why ("Make work quickly at busy times" or "Make work that shows people quickly at busy times" off in Settings (premium rendering of a motion transfer always needs both), the monthly premium spending limit) |
| `motion_scenes` | 400 | The motion clip has cuts and not every scene can be made: more than 6 scenes (`reason: too_many`) or a scene under 1 second (`too_short`); with `first_shot_only` a first shot under 1 second (`first_too_short`). `scenes`, `scene_seconds` and `first_shot_ok` say what was found; send `first_shot_only: true` to make the first shot alone ([clips with cuts](https://bobabanana.com/docs/api/videos/#clips-with-cuts)) |
| `engine_unavailable` | 503 | Retry after `Retry-After` seconds |
| `storage_full` | 507 | The service's disk is full; retry later |

Job failures (as opposed to request errors) appear inside the job: `"status": "failed", "error": {"code": "render_failed", "message": "...", "steps": {...}}`.

## When to retry

1. **Do not retry `400`, `401`, `404`, `409` or `422` unchanged.** Fix the request first.
2. **Retry `429` and `503` after the `Retry-After` header.**
3. **Retry network errors and `5xx` with backoff and an `Idempotency-Key`**, so a retried create cannot run twice.
4. **A failed job can be resubmitted** as a new request; changing the prompt or references often helps.

## Confirming your password in the studio

Sensitive studio actions (creating an API key, changing your email or password, two-step sign-in, admin changes) ask
you to confirm your password. Each confirmation counts, including successful ones: after 5 in 10 minutes the studio
answers `429 too_many_attempts` until the window ends. Wrong passwords also count towards the account lockout.
