> ## 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.

# Troubleshooting

> Answers to why a key, an MCP sign-in, an upload token, an upload, a link or a frame doesn't work, and how to see where and how long a render took.

Every error has a `code`, a `message` that says what to do, and a `doc_url` that explains the
code on [Errors](https://rendermate.com/docs/errors.md). This page answers the questions behind the most common ones.

## Why does my API key get a 401?

The API doesn't recognise the key, usually because it was sent without its prefix. Check that:

* the header is `Authorization: Bearer <key>`, with the key whole, including its prefix:
  `sk_live_…` for Production, `sk_test_…` for Sandbox, `sk_…` for other workspaces. A key without
  its prefix gets a 401;
* the key hasn't been revoked under **api keys** in the dashboard;
* for a member's own key, the member is still in the organization. A member's key stops working
  when they leave.

## What does `key_without_workspace` mean?

The key wasn't created for a workspace, so the API can't tell where it acts, and answers 403
`key_without_workspace`. Create a key in the dashboard, under **api keys** in the workspace it
should act in.

## Why do my requests act in the wrong workspace?

A key acts in the workspace it was created in, and a sign-in acts in the workspace picked when
signing in. To see which one a request uses:

* REST: `GET /v1/account` returns `workspace_id` and `workspace_name`;
* MCP: the `get_account` tool;
* CLI: `rendermate whoami`. When `RENDERMATE_API_KEY` is set, the CLI uses it instead of your
  sign-in.

To act in another workspace, use a key from that workspace, run `rendermate login` again, or sign
in to your MCP client again and pick it. `https://api.rendermate.com/mcp/<workspace_id>` always
acts in that one workspace.

## Why can't my MCP client sign in?

The answer depends on the error the client shows:

* **`mcp_sign_in.expired`:** the sign-in page was open too long. Start again from the client.
* **`workspace.not_found`:** you have no role in the workspace you picked, or in the one in the
  MCP URL. Ask an organization admin for a role, or pick another workspace.
* **The client never opens a sign-in page:** it doesn't support signing in to MCP servers. Send an
  API key in its `Authorization` header instead, as for [Cursor](https://rendermate.com/docs/mcp/cursor.md) and
  [Claude Code](https://rendermate.com/docs/mcp/claude-code.md).

## Why does my upload token get a 401?

An upload token gets `401 unauthorized` once it expires: 15 minutes after it's made, unless it was
made with `expires_in` (60 seconds to 24 hours). Make a new one on your backend.

## Why does my upload token get a 403 or a 409?

An upload token records only what its scope allows. It gets `403 forbidden` for an asset name
outside its `prefix`, a file larger than its `max_size`, or a project other than its own, and
`409 asset.name_taken` for a name that already has an asset, because a token never replaces one.

## Why doesn't my upload finish?

The error says which step failed:

* **`invalid_request` saying the file is a different size:** the bytes uploaded don't match the
  `size` you sent. Upload the file again.
* **`asset.content_changing`:** the file changed while it was uploading. Upload it again once it
  stops changing.
* **`upload.not_found`:** the upload of a file still being written expired after 7 days, or belongs
  to another workspace. Start a new upload.
* **A multipart upload is refused when you record it:** send every part's `part_number` and the
  `ETag` header its `PUT` returned, exactly as returned.

## Why doesn't my link play?

A link stops playing when it's revoked or expires:

* **`410 link.revoked`:** the link was revoked. Create another link.
* **`410 link.expired`:** the link passed its `expires_at`. Update `expires_at`, or create another
  link.
* **On a custom domain:** a domain serves links once it's active. Its DNS records are on the
  dashboard's **link domains** page and from `GET /v1/domains`. See
  [Custom domains](https://rendermate.com/docs/custom-domains.md).

## How do I protect a link with a password?

Set `password` (4 to 128 characters) when you create the link, or later with
`PATCH /v1/links/{id}` or the MCP tool `update_link`; `"password": null` removes it. Links show
`password_protected: true` and never the password. The dashboard sets, changes and removes it
under **links** on a document's page.

Viewers enter the password on the link's view or embed page before the video plays, and stay
unlocked on that page for 24 hours, or until the link expires. Until then its title, poster,
playlist, segments, thumbnails, storyboards and animated GIFs all answer
`401 link.password_required`, and its link previews show no title or image. A new password, or
removing it, ends every viewer's unlock and every playback URL made under the old one.

`GET /v1/links/{id}/playback` with an API key plays a link without its password.

## Why does my link ask for a password?

The link has a password: `password_protected` is `true`. Enter it on the page, or remove it with
`PATCH /v1/links/{id}` and `"password": null`. After 5 wrong passwords from one address in 15
minutes, or 100 from everyone in an hour, the page answers `429 link.password_attempts` until
`Retry-After` passes.

## How do I make a link's video render again?

Purge it with `POST /v1/links/{link_id}/purge` (the `purge_link` MCP tool). It deletes the stored
renders of the version the link plays now and clears the CDN's cached copies of the link's video,
thumbnails, storyboards and GIFs, within a minute. The next view renders them again, billed as
new renders, except video and audio segments whose content is unchanged and still stored, which
are reused. `POST /v1/documents/{document_id}/purge` (`purge_document`) does the same
for every version of a document and every link to it. Both answer `202` and need an API key that
may publish. An organization can ask for 60 purges an hour; more get `429 purge.rate_limited`.

A purge covers the version, not only the link: other links to it play the new renders too, and a
finished export of it stops downloading (`404`). Export it again for a new download.

## How long does the CDN keep a link's video?

Up to a day. Revoking a link, moving its `expires_at` earlier and deleting a document clear the
CDN's copies on their own, within a minute, without deleting renders or counting toward the
purge limit.

## Why does `get_frame` return 408 `frame.rendering`?

The frame is still rendering. Ask for it again in a few seconds. It's rendered, and billed, once.

## How do I see where a video was rendered and how long it took?

Read the response headers. Every response that serves rendered media says whether it was a
cache hit, where the file was rendered and how long that took. This covers video and audio
segments, thumbnails, storyboards, animated GIFs, `POST /v1/documents/{id}/frames` and the 408s
they answer while a file renders. Include these headers when you contact support about a slow
or wrong render:

```sh theme={null}
curl -sI "https://api.rendermate.com/link/lnk_…/1080p/0.cmfv?version=…&token=…"
```

```http theme={null}
HTTP/2 200
content-type: video/mp4
cache-status: Rendermate; hit
rendermate-render-id: doc_…/12/1920x1080/video-3/0000.cmfv
rendermate-region: us-east
rendermate-render-cell: aws-us-east-2
rendermate-render-device: NVIDIA L4
rendermate-render-ms: 4120
rendermate-queue-ms: 830
rendermate-rendered-at: 2026-12-03T10:41:07Z
server-timing: storage;dur=12, render;dur=4120;desc="First render", queue;dur=830;desc="First render's queue"
```

| Header | What it says |
| - | - |
| `Cache-Status` | `Rendermate; hit`: the file was already rendered. `Rendermate; hit; detail=reused`: this part of the video is unchanged from another version, whose render it reuses. `Rendermate; fwd=uri-miss; stored`: it was rendered for this request. `Rendermate; fwd=uri-miss`: it's still rendering (on a 408). |
| `Rendermate-Render-Id` | The file: its document, version, size and part. |
| `Rendermate-Region` | The region it's stored and rendered in, such as `us-east`. |
| `Rendermate-Render-Cell` | Where it rendered: a cloud and its region, such as `aws-us-east-2` or `gcp-us-east4`. |
| `Rendermate-Render-Device` | The GPU that rendered its pictures, such as `NVIDIA L4`, or `cpu`. Audio and init segments have none. |
| `Rendermate-Render-Ms` | How long rendering it took, in milliseconds. |
| `Rendermate-Queue-Ms` | How long the render waited to start, in milliseconds. |
| `Rendermate-Rendered-At` | When it was rendered, in RFC 3339. |
| `Server-Timing` | The same timings for your browser's developer tools (Network, Timing): first this request's own, `storage` (finding a file already rendered) or `wait` (waiting for the render), then `render` and `queue`, the file's first render and how long it waited to start. |

A file rendered once keeps the same `Rendermate-Render-*` values every time it's served, so a hit
says where and how long its first render took. A browser's scripts can read every one of these
headers. Files rendered before these headers existed have only `Cache-Status`,
`Rendermate-Render-Id` and `Server-Timing`.

A response with `X-Cache: Hit from cloudfront` is a copy the CDN kept of a segment or an image:
`Age` says how many seconds ago it was fetched, and `Cache-Status` and `Server-Timing` describe
that fetch, not this request.

An export's download says how the export was made:

| Header | What it says |
| - | - |
| `Rendermate-Export-Segments` | Its video segments. |
| `Rendermate-Export-Rendered` | How many of them it rendered; it found the rest already rendered. |
| `Rendermate-Export-Reused` | How many of them it reused from another version of the document, where that part of the document is unchanged. |
| `Rendermate-Export-Ms` | How long the export took, from its start until its download was ready, in milliseconds. |
| `Rendermate-Render-Cells` | Where its files were rendered, such as `aws-us-east-2, gcp-us-east4`. |

## How do I search the docs from code or an agent?

`GET /v1/docs/search?query=…`, or the `search_docs` MCP tool, returns the sections of these docs
that match, with their links. Agents connected to the MCP server use it before guessing.


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