# Render the scene video

URL: https://clippie.ai/developers/docs/render-scene

Renders the finished video from your scene file: your shots, the voice, one-word captions, music and your sound cues (about 5 minutes of render per minute of video). Only call it when every shot has been previewed and reads. One render per project (it is what the project's credits paid for); if the code fails the project goes back to ready and you can fix it and render again. Follow it with get_scene_project waitSeconds until completed.

## At a glance

| Property | Value |
| --- | --- |
| REST | `POST https://api.clippie.ai/v1/scene-projects/:projectId/render` |
| MCP tool | `render_scene` |
| Scope | `create` |
| Cost | Spends nothing. Needs the `create` scope. |
| Limit bucket | `render` (see [Rate limits](https://clippie.ai/developers/docs.md#rate-limits)) |

## Parameters

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `projectId` | path | string | Yes |  | The scene project (sceneProjectId from create_scene_project). 1-80 chars. |
| `code` | body | string | No |  | The whole scene file (TypeScript, up to 100 KB): it imports only "../scene" and "./words.json" and ends with `export default episode<P>({ ... })`. Leave out to use the file sent last. Up to 100000 chars. |
| `shots` | body | array of object | No | `[]` | Your cut list: the word index each shot starts on and a short name for where it is. A whoosh is mixed in on every change of place, and the review sheet is cut on it. Up to 200 items. |
| `sounds` | body | array of object | No | `[]` | Sound cues: 6 to 12 that mean something (a thud on an impact, a chime on a reveal). `sound` is a file name from get_scene_kit part "sounds". Up to 40 items. |
| `music` | body | string | No |  | A music bed from get_scene_kit part "sounds". Leave out for the default. Up to 60 chars. |

## Example

curl:

```bash
curl https://api.clippie.ai/v1/scene-projects/PROJECT_ID/render \
  -H "Authorization: Bearer $CLIPPIE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

render-scene.mjs:

```js
const auth = { Authorization: `Bearer ${process.env.CLIPPIE_API_KEY}` };

const res = await fetch('https://api.clippie.ai/v1/scene-projects/PROJECT_ID/render', {
  method: 'POST',
  headers: { ...auth, 'Content-Type': 'application/json' },
  body: JSON.stringify({}),
});
if (!res.ok) throw new Error((await res.json()).error.message);
console.log(await res.json());
```

## Response

`200` with JSON. The full response schema is in the [OpenAPI spec](https://api.clippie.ai/v1/openapi.json).

## From an MCP client

Your AI calls `render_scene` with the same fields as JSON arguments. See [MCP server](https://clippie.ai/developers/docs.md#mcp) to connect one.

tools/call:

```json
{
  "name": "render_scene",
  "arguments": {
    "projectId": "PROJECT_ID"
  }
}
```
