> ## Documentation Index
> Fetch the complete documentation index at: https://rendermate.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> Every error code the Rendermate REST API and MCP tools return, what it means, what to do about it, and whether to retry.

An error is an HTTP status and a body with a stable `code`, a `message` that says what to do, a
`doc_url` that links the code's row on this page, and the request's `request_id`. MCP tools return
the same body as their error result. Some errors add fields of their own, such as
`newest_version` or `commit_id`.

```json theme={null}
{
  "error": {
    "code": "asset.name_taken",
    "message": "an asset named \"launch/intro.mp4\" already exists",
    "doc_url": "https://rendermate.com/docs/errors#asset.name_taken",
    "request_id": "req_019ae3c2f1d47a2b8c5e6f7a8b9c0d1e"
  }
}
```

Match on `code`, never on `message`: messages can be reworded, codes don't change.

Every response, error or not, carries its request ID in the `x-request-id` header. Quote it when
you ask for help with a request.

## Which errors should I retry?

Retry only where the **Retry?** column says so. Every other error fails the same way each time
until the request changes. Retry with exponential backoff, starting at about a second.

## How do I retry safely?

* **Commits:** a commit takes a `commit_id` (or an `Idempotency-Key` header). Sending the same
  request again with the same one never makes a second commit: it answers with the commit that was
  made.
* **Exports:** exports of the same version and settings share their work. Creating one again makes
  another export, with a new `exp_` ID, that joins the work already running or finished, so nothing
  renders twice.
* **Reads** are always safe to repeat.

## Keys and sign-in

| Status | Code | What to do | Retry? |
| - | - | - | - |
| 401 | `unauthorized` | Send a valid API key as `Authorization: Bearer sk_…`, or sign in again from your MCP client. See [Troubleshooting](https://rendermate.com/docs/troubleshooting.md#why-does-my-api-key-get-a-401). | No, fix the key |
| 403 | `key_without_workspace` | The key wasn't created for a workspace. Create one in the dashboard, under **api keys** in the workspace it should act in. | No |
| 403 | `forbidden` | Your role in the workspace doesn't allow this. See [Permissions](https://rendermate.com/docs/authentication.md#permissions). An expired export download URL returns it too: get the export again for a new URL. | No |
| 400 | `workspace.required` | An organization key (`sk_org_…`) names the workspace it acts in. Send the header `Rendermate-Workspace: ws_…`, or use the MCP URL `/mcp/<workspace_id>`. The organization's own routes, `/v1/workspaces` and `/v1/organization`, need no header. | No, name the workspace |
| 403 | `workspace.organization_key_required` | A workspace's key acts in its own workspace only, so it can't create, delete or restore workspaces or rename the organization. Use an organization key, which an organization admin creates in the dashboard under **settings**, or sign in as an organization admin. | No |
| 404 | `workspace.not_found` | No such workspace, or you have no role in it. Check the workspace ID in the MCP URL, or ask an admin for a role. | No |
| 409 | `workspace.last` | The workspace is the organization's last one, so it can't be deleted. Create another workspace first. | No |
| 410 | `workspace.deleted` | The workspace is being deleted: nothing acts in it, and it's purged at its `purge_at`. Until then an organization admin or an organization key can restore it with `restore_workspace` (`POST /v1/workspaces/{workspace_id}/restore`). | No, restore it first |
| 404 | `mcp_sign_in.expired` | The MCP sign-in took too long. Start it again from your MCP client. | No, sign in again |

## Requests

| Status | Code | What to do | Retry? |
| - | - | - | - |
| 400 | `invalid_request` | An argument is missing or wrong. The message says which one and what it takes. | No, fix the request |
| 404 | `not_found` | No such export, generation or model in this workspace. `list_models` shows every model. | No |
| 500 | `internal` | Something failed on our side. | Yes, with backoff |
| 501 | `not_available` | The endpoint can't be used. | No |
| 502 | `provider_error` | The model provider a [person](https://rendermate.com/docs/mcp/tools/persons.md) is checked with couldn't do it right now. The message ends with the provider's code. | Yes, with backoff |
| 503 | codes ending in `unavailable` | That part of the API can't be used right now. | Yes, with backoff |

## Credits

| Status | Code | What to do | Retry? |
| - | - | - | - |
| 402 | `credits.empty` | The organization's credit balance is empty. Add credits in the dashboard, under **billing**, or turn on auto-refill. Generations and renders not made before (link playback segments, frames) return it. An export instead fails, with status `failed` and this message, at the first segment it would have to render. See [Billing and credits](https://rendermate.com/docs/billing.md#what-happens-when-my-credits-run-out). | Only after adding credits |
| 503 | `credits.unavailable` | The credit balance can't be checked right now, so billable work can't start. | Yes, with backoff |

## Projects and documents

| Status | Code | What to do | Retry? |
| - | - | - | - |
| 400 | `document.invalid` | The JSX reads, but the document it makes isn't a valid [Rendermate document](https://rendermate.com/docs/documents.md). `diagnostics` lists each problem with its `code`, `message`, and where known the `node_id` or `asset_id` it's about and the `pointer` (a JSON Pointer) to the part that's wrong. | No, fix the document |
| 400 | `document.media_not_asset` | The document loads media from somewhere other than its workspace, such as an `https://` URL or an inline `data:` URI. `pointer` is the JSON Pointer to it. Import the file with `import_asset` (`POST /v1/imports`), or upload it with `upload_asset`, and refer to it as `asset://<name>`. See [Can a document load media from a URL?](https://rendermate.com/docs/documents.md#can-a-document-load-media-from-a-url) | No, fix the document |
| 400 | `document.asset_not_found` | The document uses `asset://<name>`, but the workspace has no asset by that `name`. `pointer` is the JSON Pointer to it. Upload or import the file under that name, or fix the name. | No, fix the document or add the asset |
| 400 | `message.required` | An edit has no `message`. Give one line saying why the document changes. | No, fix the request |
| 400 | `jsx.unreadable` | The JSX can't be read. The message gives the line and column, and the line. | No, fix the JSX |
| 400 | `jsx.edit.unmatched` | An edit's `old_text` doesn't occur exactly once in the document's JSX, as the edits before it left it. Read the document again, or include more of the text around it, such as the node's `id="…"`. | No, fix the edit |
| 400 | `jsx.cut` | The JSX has a `Doc.cut` or `...Doc.more` that doesn't stand where the document's JSX printed it. Leave those where they are, or write out the whole string or array in their place. When creating a document, write it out whole. | No, fix the JSX |
| 400 | `jsx.timebase` | The edit changes `canvas.ticksPerSecond`, which can't change: every time is stored in it. | No, fix the edit |
| 400 | `expression.too_large` | The edit's expressions write too much once written out. Write fewer of them in one edit, or put a repeated part in a curve. | No, fix the edit |
| 404 | `project.not_found` | No such project in this workspace. `list_projects` shows them. | No |
| 404 | `document.not_found` | No such document in this workspace. | No |
| 404 | `version.not_found` | The document has no such version. `newest_version` names its newest. | No |
| 404 | `alias.not_found` | The document has no such alias. Every document has `latest`. | No |
| 408 | `frame.rendering` | The frame is still rendering; it isn't billed again. | Yes, after a few seconds |
| 422 | `document.audio_only` | The version has only sound (every node is `audio` or `tone`), so it has no frame, thumbnail, storyboard or animated GIF to show and no video to export as `mp4`. Its links play its audio; export it with `format` `m4a`. See [Documents](https://rendermate.com/docs/documents.md#can-a-document-have-only-sound). | No |
| 409 | `document.exists` | A document with that ID already exists. | No |
| 409 | `version.conflict` | Another commit landed after `base_version`. Read the document at `newest_version` and redo the edit onto it. | Only after redoing the edit onto `newest_version` |
| 409 | `commit_id.reused` | That `commit_id` was used for a different commit. | No, use a new `commit_id` |
| 503 | `document.contended` | Too many writes to this document at once. Nothing was written. | Yes, with backoff |
| 503 | `commit.unknown` | The commit may or may not have been made. The error carries its `commit_id`. | Yes, with the same `commit_id` |

## Assets and uploads

| Status | Code | What to do | Retry? |
| - | - | - | - |
| 404 | `asset.not_found` | No asset by that name, or no assets under that folder. Names are case-sensitive paths, such as `launch/intro.mp4`. | No |
| 404 | `upload.not_found` | The multipart upload expired or isn't in this workspace. Start the upload again. | No, start a new upload |
| 404 | `import.not_found` | No such import in this workspace. | No |
| 409 | `asset.name_taken` | An asset already has that name. Pass `overwrite: true` to replace it, or pick another name. An [upload token](https://rendermate.com/docs/authentication.md#upload-tokens) never replaces an asset. | No |
| 409 | `asset.content_changing` | The file's content changed while it was being recorded. Upload it again once it stops changing. | Yes, once the file is stable |
| 409 | `asset.content_being_deleted` | The workspace is deleting a file with the same content, or an asset a document uses was replaced or deleted while the document was written. | Yes, after a few seconds |

## Links and playback

| Status | Code | What to do | Retry? |
| - | - | - | - |
| 404 | `link.not_found` | No such link in this workspace. | No |
| 409, 410 | `link.revoked` | The link was revoked, so it no longer plays (410) and can't be changed (409). | No, create another link |
| 410 | `link.expired` | The link passed its `expires_at`. Update `expires_at`, or create another link. | No |
| 401 | `link.password_required` | The link has a password, and the request doesn't carry an unlock of it under its current password. Viewers enter it on the link's page; `GET /v1/links/{id}/playback` with an API key plays it without one. | No, unlock it first |
| 401 | `link.password_incorrect` | That isn't the link's password. Each wrong one counts toward `link.password_attempts`. | No, with the right password |
| 429 | `link.password_attempts` | Too many wrong passwords for the link: 5 from one address in 15 minutes, or 100 from everyone in an hour. | Yes, after `Retry-After` seconds |
| 429 | `purge.rate_limited` | The organization asked for 60 purges this hour. The message says when the next hour starts. | Yes, in the next hour |

## Custom domains

| Status | Code | What to do | Retry? |
| - | - | - | - |
| 404 | `domain.not_found` | No such domain in this workspace. | No |
| 409 | `domain.taken` | The domain is already added to a workspace. | No |
| 409 | `domain.in_use` | Another site uses the domain. Remove it there first. | No |
| 409 | `domain.not_active` | Set the DNS records the domain lists, then try again. See [Custom domains](https://rendermate.com/docs/custom-domains.md). | No, set its DNS records first |
| 409 | `domain.limit` | The workspace has 10 domains. Remove one first. | No |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.