# Errors

When a request fails, the API responds with an HTTP status code and a JSON body:

```json
{ "error": { "code": "head_moved", "message": "The head of variation 'main' moved: it is now 4f0a1c2e-6b3d-4e59-a7c4-1d2e3f4a5b6c. Fetch it, re-apply your change on it and send the change again." } }
```

- `code` names the error and does not change. Have your code check it to decide what to do.
- `message` says what went wrong and what to do. Its wording may change, so don't match on it.
- Every response has a `Request-Id` header. Quote it when you [report a problem](/docs/blitframe/errors#report-a-problem).

Some work runs after its request has returned, such as a render or the check of an upload. When that work fails, the render or upload has the same `code` and `message` in its `error` field. See [Background work](#background-work).

## Request errors

A request error comes back as the response to the request that failed. The table's **Retry?** column says whether sending the request again can work. It has one of these values:

| Retry? | What to do |
|---|---|
| Yes | Send the same request again, waiting longer between tries. A `POST` or `PATCH` sent without an `Idempotency-Key` header may have worked before the error, so check first that it did not. See [Retrying](#retrying). |
| After `Retry-After` | Wait the number of seconds in the response's `Retry-After` header, then send it again. |
| Later | Something else has to finish first, and the row says what. Then send the same request again. |
| After a fix | The same request would fail again. Do what the row says, then send it. |
| No | Don't send it again. It can't succeed. |

| Status | Code | Retry? | Meaning and what to do |
|---|---|---|---|
| 400 | `invalid_request` | After a fix | Something in the request is missing or invalid, the body is empty, or it has a field the endpoint doesn't take. The message names the field. Field names and values such as `"high"` are case-sensitive. An id in the path that is not a UUID is this error too. |
| 400 | `font_license_required` | After a fix | The request adds a font file without `fontLicenseAccepted: true`. Send that field to confirm you are licensed to use the font. See [Fonts](/docs/blitframe/fonts#licensing). |
| 401 | `unauthorized` | After a fix | The API key or MCP sign-in is missing or not valid. See [Authentication](/docs/blitframe/authentication). |
| 401 | `invalid_token` | After a fix | The link that plays an HLS render has expired. Get the render again: it has a new `hlsUrl`. |
| 402 | `insufficient_render_seconds` | After a fix | You are out of render seconds, the workspace has no trial or plan, or a failed payment is unpaid. Choose a plan, or update your card, in **Console → Settings → Plan & billing**. See [Balance](/docs/blitframe/billing#balance). |
| 402 | `payment_disputed` | Later | A payment is disputed with the card's bank. Renders, uploads and edits that add files are paused until the dispute is closed. |
| 403 | `plan_limit` | After a fix | The render is longer or larger than your [plan allows](/docs/blitframe/limits#plan-limits). Make the composition shorter or smaller. |
| 403 | `plan_feature` | After a fix | The request uses something your [plan](/docs/blitframe/limits#plan-limits) does not include: a render link, a codec other than `h264`, encoding settings or 3D models. Leave it out, or choose a plan that includes it. |
| 403 | `storage_limit` | After a fix | What you add doesn't fit in your plan's storage. Delete projects or renders, or choose a [larger plan](/docs/blitframe/limits#plan-limits). |
| 403 | `project_too_large` | After a fix | The upload, edit or ZIP import would make a version larger than your [plan's project size](/docs/blitframe/limits#plan-limits). Remove or shrink files. |
| 403 | `product_project` | After a fix | Another Code Artworks product made this project, so it is read-only. [Duplicate it](/docs/blitframe/projects#duplicating-a-project) and edit the copy. |
| 403 | `role_not_allowed` | After a fix | Only when an app signed in with your Code Artworks account instead of a key. Your role in the workspace is Billing, which can't use the API. Ask an owner or admin to change your role. |
| 403 | `workspace_suspended` | After a fix | Code Artworks suspended the workspace. Suspending deletes nothing, though we may delete the files of a workspace suspended for abusing free trials. Contact support to restore it. |
| 403 | `email_not_verified` | After a fix | Only when an app signed in with your Code Artworks account instead of a key. Your account's email address is not confirmed yet. Confirm it, then connect the app again. |
| 403 | `key_cannot_revoke_keys` | No | An API key can revoke only itself, and a signed-in MCP connection only the keys its person created. Revoke other keys in the console. See [API keys](/docs/blitframe/authentication). |
| 404 | `not_found` | After a fix | The object doesn't exist or belongs to another workspace, or no endpoint matches the path. |
| 405 | `method_not_allowed` | After a fix | The endpoint does not accept that HTTP method. The `Allow` header lists the ones it does. |
| 408 | `too_slow` | Yes | A request body over 1 MB took more than two minutes to arrive. Send large files through an [upload](/docs/blitframe/uploads). |
| 409 | `head_moved` | After a fix | Another edit changed the project first, so its head (the version the project is at now) is not the one your edit expected. Get the head, re-apply your change on it and send it again. See [edits and the head](/docs/blitframe/projects#edits-and-the-head). |
| 409 | `idempotency_key_in_use` | Later | A request with the same `Idempotency-Key` is still running. Send yours again when it has finished. See [retrying safely](/docs/blitframe/api#retrying-safely). |
| 409 | `variation_exists` | After a fix | The project already has a [variation](/docs/blitframe/variations#create-a-variation) with that name. Pick another name. |
| 409 | `variation_limit` | After a fix | The project has 10,000 [variations](/docs/blitframe/variations), `main` included. Delete one first. |
| 409 | `render_active` | After a fix | The render is queued or running. Cancel it before you delete it. |
| 409 | `renders_active` | After a fix | The project has queued or running renders. Cancel them before you delete the project. |
| 409 | `render_finished` | No | The render already succeeded or failed, so it cannot be cancelled. Cancelling a cancelled render returns it as it is. |
| 409 | `render_not_ready` | Later | The request needs a render that has succeeded, and this one has not. If it is still queued or running, [wait for it](/docs/blitframe/renders#waiting-for-a-result). If it failed or was cancelled, render the version again. |
| 409 | `export_not_ready` | Later | The request names a [version export](/docs/blitframe/projects#exporting-a-version) that is not ready. If it is queued or building, wait for it. If it failed, export the version again. |
| 409 | `upload_incomplete` | After a fix | The request names an [upload](/docs/blitframe/uploads#complete-it) that has not been completed, or completes one whose bytes were not sent. Send the file's bytes and complete the upload first. |
| 409 | `upload_processing` | After `Retry-After` | The request names an [upload](/docs/blitframe/uploads#complete-it) that Blitframe is still checking. Wait, or get the upload with the `Prefer: wait=N` header, which holds the response while the check runs. |
| 409 | `upload_failed` | After a fix | The request names an [upload](/docs/blitframe/uploads#complete-it) that failed its check. The message says why. If the upload's error is `interrupted`, complete the upload again. Otherwise create a new upload. |
| 409 | `webhook_disabled` | After a fix | The [webhook](/docs/blitframe/webhooks) endpoint is disabled. Enable it first. |
| 409 | `too_many_render_links` | After a fix | The project has 50 [render links](/docs/blitframe/render-links). Revoke one first. |
| 409 | `api_key_limit` | After a fix | The workspace has 25 active [API keys](/docs/blitframe/authentication). Revoke one first. |
| 409 | `webhook_limit` | After a fix | The workspace has 10 [webhook](/docs/blitframe/webhooks) endpoints. Delete one first. |
| 409 | `upload_limit` | After a fix | The workspace has 1,000 unexpired [uploads](/docs/blitframe/uploads). Use or delete some, or wait for them to expire. |
| 409 | `archive_limit` | Later | 10 [download archives](/docs/blitframe/renders#download-many-videos-as-one-zip) are already waiting or building. Wait for one to finish. |
| 409 | `export_limit` | Later | 10 [version exports](/docs/blitframe/projects#exporting-a-version) are already waiting or building. Wait for one to finish. |
| 409 | `html_ad_limit` | Later | 10 [HTML5 ads](/docs/blitframe/renders#html5-ads) are already waiting or being made. Wait for one to finish. |
| 409 | `import_limit` | Later | 10 [ZIP imports](/docs/blitframe/uploads#large-zips) are already waiting or running. Wait for one to finish. |
| 409 | `batch_limit` | Later | 10 [batches of variations](/docs/blitframe/variations#create-many-variations) are already waiting or running. Wait for one to finish. |
| 413 | `too_large` | After a fix | The request body is over its limit: 64 MB for edits, renders, batch renders, batches of variations and MCP. Or a file is over the [limit for its kind](/docs/blitframe/uploads#file-capabilities) or 8 GB, or an [HTML5 ad](/docs/blitframe/renders#html5-ads) would be too large. Send large files through an [upload](/docs/blitframe/uploads). |
| 415 | `unsupported_media_type` | After a fix | The body is not JSON in UTF-8, or not sent as `Content-Type: application/json` with no charset or `charset=utf-8`. |
| 422 | `idempotency_key_reused` | After a fix | That `Idempotency-Key` was used for a different request in the last 24 hours. Use a new key. See [retrying safely](/docs/blitframe/api#retrying-safely). |
| 422 | `version_not_renderable` | After a fix | The version can't be rendered. See [Render refusals](#render-refusals). A render that was already queued can fail with this code too: see [Background work](#background-work). |
| 429 | `rate_limited` | After `Retry-After` | You sent too many API requests, problem reports, feedback messages (10 an hour per workspace, 5 a day on the free trial), or webhook endpoint changes, tests and redeliveries. See [rate limits](/docs/blitframe/limits#api-and-workspace). Over MCP, a limit other than the request limit comes back as a tool result whose text ends with how long to wait, such as `Retry-After: 12 seconds.` |
| 429 | `large_body_busy` | After `Retry-After` | The workspace is sending too many requests with a body over 1 MB at once. |
| 451 | `region_unavailable` | No | The API is not available in your country. [Contact us](https://codeartworks.com/#contact) if you need access. |
| 500 | `internal_error` | Yes | Something failed on Blitframe's side. If it keeps failing, [report a problem](/docs/blitframe/errors#report-a-problem) with the `Request-Id`. |
| 503 | `interrupted` | Yes | Work stopped on Blitframe's side before it finished. For a ZIP import, import the ZIP again. |
| — | `invalid_arguments` | After a fix | Only over MCP, in a tool result with `isError`. An argument of the tool call has the wrong type or value. |

Over MCP, any other failed tool call is a tool result with `isError: true`. Its text starts with the code, such as `head_moved: …`. See [MCP results and errors](/docs/blitframe/own-agent#results-and-errors).

## Render refusals

This table lists why Blitframe refuses a render, a batch (many renders in one request), or a request to download, cancel or delete renders or to make an HTML5 ad. A refused render or batch is not queued and not charged. [Uploads](/docs/blitframe/uploads#refusals) and [variations](/docs/blitframe/variations#refusals) list their own refusals.

| Request | Response | When |
|---|---|---|
| Render | `400 invalid_request` | Both `projectId` and `versionId` are sent, or neither. Send one of them. |
| Render or batch | `400 invalid_request` | `variation` is sent with `versionId`. Send one or the other. |
| Render or batch | `404 not_found` | The project, version or `variation` doesn't exist in your workspace. |
| Render or batch | `400 invalid_request` | `frames` is missing for a frame render, or sent with `mp4` or `hls`. Or it is not `0 ≤ start < end ≤` the frame count, or covers more than 1,000 frames. |
| Render or batch | `400 invalid_request` | `audio` has no `path`, its `offsetSeconds` is outside 0 to 3,600, or its `path` is not an audio file in the version. |
| Render or batch | `400 invalid_request` | A replacement does not fit the version. See [replacement details](/docs/blitframe/layers#replacement-details). |
| Render or batch | `400 invalid_request`, or `409 upload_incomplete`, `upload_processing` or `upload_failed` | An upload a replacement names is not usable. See [which response when](/docs/blitframe/renders#when-an-upload-is-refused). |
| Render or batch | `400 invalid_request` | An upload is named more than once. In a batch, only one item can name an upload. |
| Render or batch | `400 invalid_request` or `422 idempotency_key_reused` | The `Idempotency-Key` breaks the key rules, or was used for another request. See [retrying safely](/docs/blitframe/api#retrying-safely). |
| Batch | The response that item would get as a single render | One item of the batch is refused. The message starts with which item, such as `renders[1]: …`. No render of the batch is queued. |
| Render or batch | `413 too_large` | The request body is over 64 MB. |
| Render or batch | `422 version_not_renderable` | The project is empty, or the version has `problems`. [Read them](/docs/blitframe/projects#problems-and-warnings) and fix it first. |
| Render or batch | `422 version_not_renderable` | The version's files total more than 8 GB. Remove files the composition does not use. |
| Render or batch | `422 version_not_renderable` | The composition's width or height is an odd number, and MP4 and HLS renders need both even. Make them even, or render frames. |
| Render or batch | `422 version_not_renderable` | What the render writes needs more than 40 GB. Render fewer frames, a lower quality or a shorter video. |
| Render or batch | `403 plan_limit` | The render is longer or larger than your [plan allows](/docs/blitframe/limits#plan-limits). |
| Render or batch | `403 plan_feature` | A codec other than `h264`, or encoding settings, on a plan without them. Or a version with a `.glb` or `.gltf` file on a plan without 3D models. |
| Render or batch | `403 storage_limit` | The render doesn't fit in your plan's storage. |
| Render or batch | `402 insufficient_render_seconds` | Your balance is too low, the workspace has [no trial](/docs/blitframe/billing#free-trial) or plan, or a failed payment is unpaid. A batch needs enough for all its renders. |
| Render or batch | `402 payment_disputed` | A payment is disputed with the card's bank. |
| Download archive | `400 invalid_request` | One of the renders is a frame render, or has not succeeded. |
| Download archive | `404 not_found` | An id is not one of your renders. |
| Download archive | `403 storage_limit` | The workspace's storage has no room for the archive. |
| Download archive | `409 archive_limit` | 10 archives are already waiting or building. |
| Cancel | `409 render_finished` | The render already succeeded or failed. |
| Delete | `409 render_active` | The render is queued or running. Cancel it first. |
| HTML5 ad | `400 invalid_request` | The render is a frame render or uses a codec other than `h264`, or a parameter of the request is not valid. |
| HTML5 ad | `409 render_not_ready` | The render has not succeeded. |
| HTML5 ad | `413 too_large` | The video alone makes the ad 5 MB or more, or is over The Trade Desk's limit. The message gives the size and a `quality`, or `bitrateKbps`, that would fit; otherwise shorten the video. |
| HTML5 ad | `409 html_ad_limit` | 10 HTML5 ads are already waiting or being made. |

## Background work

Renders, uploads, ZIP imports, batches of variations, download archives, version exports and HTML5 ads are finished in the background, after their request has returned. When one fails, its `error` field holds one of these codes, or one of the request codes above. Blitframe does not retry failed work: you start it again.

| Code | Where | Retry? | Meaning and what to do |
|---|---|---|---|
| `interrupted` | Any | Yes | The work stopped on Blitframe's side. Start it again, or complete the upload again. If the message names a missing file, add that file in an edit and render the new version. An interrupted render is [refunded](/docs/blitframe/renders#pricing). |
| `check_limit` | Uploads | After a fix | Checking the upload stopped on Blitframe's side three times. Create a new upload. If it keeps happening, [report a problem](/docs/blitframe/errors#report-a-problem). |
| `internal_error` | Any | Yes | It failed on Blitframe's side. If it keeps failing, [report a problem](/docs/blitframe/errors#report-a-problem). A render that failed this way is [refunded](/docs/blitframe/renders#pricing). |
| `render_failed` | Renders | After a fix | Blitframe could not render the version. Check that the composition uses [supported features](/docs/blitframe/data-json-format#supported-features). |
| `render_time_limit` | Renders | After a fix | Rendering the frames took longer than the [render time](/docs/blitframe/limits#renders) allows. It is not refunded. The message says what to change: fewer or lighter 3D models, effects, precompositions or video layers, or for PNG and TGA frames, fewer frames per request or JPEG. |
| `render_timed_out` | Renders | Yes or after a fix | The render ran past its [time limits](/docs/blitframe/limits#renders), or did not reach its first frame within 1 minute. It is [refunded](/docs/blitframe/renders#pricing), unless it is an HLS render that had started streaming. After the 1-minute case, render again. If the message names a file or a step, do what it says first. Otherwise make the composition shorter or simpler. |
| `stopped_by_support` | Renders | After a fix | Support stopped the render. The message says why. It is [refunded](/docs/blitframe/renders#pricing). |
| `version_not_renderable` | Renders with [replacements](/docs/blitframe/renders#render-with-replacements) | After a fix | A render with replacements gets a version of its own, and that version may have `problems`. Get the render's `versionId` and read them. |
| `version_not_renderable` | Renders with replacements, `versionId` still `null` | After a fix | The replacements' files take the version over 8 GB. Use smaller files. |
| `version_not_renderable` | Renders | After a fix | The render needs more than 40 GB of [working space](/docs/blitframe/limits#files-and-versions). Set each image asset's `w` and `h` to the file's size, use fewer or shorter videos that have transparency or an odd size, or render less. |
| a [request error](#request-errors) code | Renders | After a fix | The version failed a check when the render started, or the version for the render's replacements could not be made. The message says why. |
| `invalid_request` | Download archives | After a fix | A render was deleted or has no video any more, or the videos total more than 8 GB. Request a new archive, or several smaller ones. |
| `too_large` | HTML5 ads | After a fix | The ad came to 5 MB or more. Lower the quality or shorten the video. |
| `backup_unavailable` | HTML5 ads | Yes | The backup image for The Trade Desk could not be made. Ask for the ad again. |
| `invalid_request` | HTML5 ads | After a fix | The render was deleted while the ad waited. Render the version again. |
| `invalid_request` | ZIP imports | After a fix | The ZIP's upload was deleted, or had less than an hour left when the import started. Upload the ZIP again and import it. |

## Retrying

- After a `429`, wait the seconds in `Retry-After`, then retry.
- After a `5xx`, retry a `GET`, or a request with an `Idempotency-Key`, waiting longer each time.
- Creating a project, variation or upload, editing, importing a ZIP and rendering take an `Idempotency-Key`. A retry with the same key returns the first request's result. See [retrying safely](/docs/blitframe/api#retrying-safely).
- Other `POST` and `PATCH` requests may have taken effect before the error. Check before you send them again.
- A failed edit leaves the project unchanged, so you can send it again. If no response arrived, get the head first: it shows whether the edit went through. With `expectedHeadVersionId`, the field that names the head your edit expects, a retry cannot apply twice: it gets `409 head_moved`.

## Report a problem

If a render looks wrong, or failed and you can't tell why, tell Blitframe support with a problem report. Send one with `POST /v1/problem-reports`.

Or, in the console, open **Support** at the bottom right of any page.

This example reports the render from [Render a project](/docs/blitframe/renders#render-a-project). It needs that render's `id`, so add it to the end of that example. In Go and Java, that is the end of `main`.

::: code-tabs
```bash
curl -s -X POST $BLITFRAME/problem-reports \
  -H "Authorization: Bearer $BLITFRAME_API_KEY" -H "Content-Type: application/json" \
  -d '{"renderId":"'$RENDER_ID'","message":"The logo flickers between 0:03 and 0:05."}' | jq '{id, status}'
```
```python
response = requests.post(f"{api}/problem-reports", headers=headers, json={
    "renderId": render_id,
    "message": "The logo flickers between 0:03 and 0:05.",
})
report = response.json()
print(report["id"], report["status"])
```
```javascript
const reportResponse = await fetch(`${process.env.BLITFRAME}/problem-reports`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BLITFRAME_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    renderId,
    message: "The logo flickers between 0:03 and 0:05.",
  }),
});
const report = await reportResponse.json();
console.log(report.id, report.status);
```
```typescript
const reportResponse = await fetch(`${process.env.BLITFRAME}/problem-reports`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BLITFRAME_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    renderId,
    message: "The logo flickers between 0:03 and 0:05.",
  }),
});
const report = await reportResponse.json();
console.log(report.id, report.status);
```
```php
$request = curl_init("$api/problem-reports");
curl_setopt_array($request, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [$authorization, "Content-Type: application/json"],
    CURLOPT_POSTFIELDS => json_encode([
        "renderId" => $renderId,
        "message" => "The logo flickers between 0:03 and 0:05.",
    ]),
]);
$response = curl_exec($request);
$report = json_decode($response, true);
echo $report["id"], " ", $report["status"], "\n";
```
```ruby
response = Net::HTTP.post(URI("#{api}/problem-reports"), {
  renderId: render_id,
  message: "The logo flickers between 0:03 and 0:05.",
}.to_json, json_headers)
report = JSON.parse(response.body)
p report["id"], report["status"]
```
```go
reportBody, err := json.Marshal(map[string]any{
	"renderId": renderID,
	"message":  "The logo flickers between 0:03 and 0:05.",
})
if err != nil {
	panic(err)
}
reportRequest, err := http.NewRequest("POST", api+"/problem-reports", bytes.NewReader(reportBody))
if err != nil {
	panic(err)
}
reportRequest.Header.Set("Authorization", authorization)
reportRequest.Header.Set("Content-Type", "application/json")
reportResponse, err := client.Do(reportRequest)
if err != nil {
	panic(err)
}
defer reportResponse.Body.Close()
var report map[string]any
if err := json.NewDecoder(reportResponse.Body).Decode(&report); err != nil {
	panic(err)
}
fmt.Println(report["id"], report["status"])
```
```csharp
var reportResponse = await client.PostAsJsonAsync($"{api}/problem-reports", new
{
    renderId,
    message = "The logo flickers between 0:03 and 0:05.",
});
var report = await reportResponse.Content.ReadFromJsonAsync<JsonNode>();
Console.WriteLine($"{report!["id"]} {report["status"]}");
```
```java
HttpRequest reportRequest = HttpRequest.newBuilder(URI.create(api + "/problem-reports"))
    .header("Authorization", authorization)
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString("""
        {"renderId": "%s", "message": "The logo flickers between 0:03 and 0:05."}
        """.formatted(renderId)))
    .build();
HttpResponse<String> reportResponse = client.send(reportRequest, HttpResponse.BodyHandlers.ofString());
JsonNode report = mapper.readTree(reportResponse.body());
System.out.println(report.get("id").asText() + " " + report.get("status").asText());
```
:::

| Field | Values |
|---|---|
| `message` | What went wrong, up to 2,000 characters. Required. |
| `renderId`, `versionId` | The render or version it concerns. Optional. |

A successful response (`201 Created`) means support has the report. It contains the report's `id`, which you use to read the answer: `GET /v1/problem-reports/{reportId}` shows the report's `status` (`open` or `resolved`) and support's reply in `resolution`.

The reply to a report sent with an API key is emailed to the workspace's owners and admins.

API reference: [Report a problem](/reference/blitframe/problem-reports/report-a-problem) and [Get a problem report](/reference/blitframe/problem-reports/get-a-problem-report).
