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

# Authentication

> API keys, upload tokens for browsers, and signing in from an MCP client.

Every request acts in one workspace, except those that manage workspaces and the organization.

## API keys

Members create API keys in the [dashboard](https://rendermate.com/dashboard), under **api keys** in
the workspace the key acts in. Send the key as a Bearer token:

```bash theme={null}
curl https://api.rendermate.com/v1/account \
  -H "Authorization: Bearer $RENDERMATE_API_KEY"
```

Production keys start with `sk_live_`, Sandbox keys with `sk_test_`, and keys of other workspaces
with `sk_`. A key the workspace owns acts for the workspace; a member's own key acts as that member
and stops working when they leave the organization. A key is shown once, when it's created.

The same key works for the REST API and for the MCP server at `https://api.rendermate.com/mcp`.

## Organization keys

An organization key acts for the whole organization: it creates, renames, deletes and restores
workspaces (`/v1/workspaces`), renames the organization (`/v1/organization`), and acts in any of the
organization's workspaces. Organization admins create organization keys in the dashboard, under
**settings** in the organization section. They start with `sk_org_`.

To act in a workspace, name it with the `Rendermate-Workspace` header:

```bash theme={null}
curl https://api.rendermate.com/v1/documents \
  -H "Authorization: Bearer $RENDERMATE_ORG_KEY" \
  -H "Rendermate-Workspace: ws_use_01a23d01db6576948e09ff3d2e9c1dd9"
```

A request without the header to a route that acts in a workspace gets `400` with the code
`workspace.required`. On MCP, connect an organization key to
`https://api.rendermate.com/mcp/<workspace_id>` to act in that workspace; at
`https://api.rendermate.com/mcp` only the organization and workspace tools work, and the others
answer `workspace.required`.

A workspace's own key can read and rename its workspace but not create, delete or restore
workspaces or rename the organization: those get `403` with the code
`workspace.organization_key_required`.

## Upload tokens

Never put an API key in a browser. To let a page upload files, such as recordings, your backend
makes an upload token with its key and hands the token to the page:

```bash theme={null}
curl https://api.rendermate.com/v1/upload-tokens \
  -H "Authorization: Bearer $RENDERMATE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prefix": "recordings/u_42/", "max_size": 5368709120}'
```

```json theme={null}
{
  "token": "upt_eyJ…",
  "prefix": "recordings/u_42/",
  "max_size": 5368709120,
  "project_id": "prj_01…",
  "expires_at": "2026-12-03T10:15:00Z"
}
```

The page sends the token as its Bearer token to `PUT /v1/assets/{name}`, then uploads the file
straight to storage with the presigned upload it gets back. A token:

* records only assets whose names start with its `prefix`, up to `max_size` bytes, in one project
  (`project_id`, or the workspace's default project);
* never replaces an existing asset;
* can't do anything else, including making another token;
* expires after 15 minutes, or after `expires_in` seconds (60 to 86400). Make a new one when it
  expires.

Assets a token records show the key that made the token as their creator.

## Signing in from an MCP client

MCP clients such as Claude, ChatGPT and Cursor can sign in instead of sending a key. They connect
to `https://api.rendermate.com/mcp`, open a sign-in page where the member signs in with their
rendermate account and picks a workspace, and then act as that member in that workspace, with what
their role there allows.

The [CLI](https://rendermate.com/docs/cli.md)'s `rendermate login` signs in the same way. The REST API takes the access token a
sign-in gives, as a Bearer token, in the workspace the member picked.

`https://api.rendermate.com/mcp/<workspace_id>` is the same server for one workspace. A
workspace's ID starts with `ws_`; `GET /v1/account` and the `get_account` tool show it as
`workspace_id`.

## Permissions

A signed-in member's role in the workspace decides what they can do:

| Permission | Allows |
| - | - |
| `assets:read` | Reading projects, documents, links, exports, assets and generations |
| `assets:write` | Creating and changing them |
| `assets:delete` | Deleting documents and assets |
| `assets:publish` | Creating, changing and revoking links, and managing custom domains |
| `renders:create` | Frames, exports and generations, which cost credits |

An API key can do everything in its workspace. A request its caller isn't allowed gets `403`
with the code `forbidden`.


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