Browse the docs
Developers / Docs / Templates
Preview scene frames
Checks your scene file and draws the frames you ask for (up to 12 a call), so you can look at each shot against the words said over it. Returns the pictures, compile and type errors with line numbers, and the engine's notes per frame (who is in frame and how large, BLOCKED when something hides a face, NO FACE IN FRAME). Send code to preview new code; leave it out to wait for a preview that is still drawing. Look at the middle frame of every shot, fix, preview the changed shots again. Free within the project, which has 60 previews and renders in all (project.requestsLeft is what remains).
Paste it into any AI assistant. The shortcuts open with the prompt typed in; nothing is sent until you press enter.
At a glance
- REST
POST https://api.clippie.ai/v1/scene-projects/:projectId/preview
- MCP tool
preview_scene
- Scope
create
- Cost
- Spends nothing. Needs the
createscope.
- Spends nothing. Needs the
- Limit bucket
preview(see Rate limits)
Parameters
projectId- In:
- path
- Type:
- string
- Required:
- Yes
- Description:
- The scene project (sceneProjectId from create_scene_project). 1-80 chars.
code- In:
- body
- Type:
- string
- Required:
- No
- Description:
- 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.
frames- In:
- body
- Type:
- array of integer
- Required:
- No
- Default:
[]- Description:
- Frame numbers to draw (30 a second; a word's frame is in the project's word list). Needed with code. Up to 12 items.
waitSeconds- In:
- body
- Type:
- integer
- Required:
- No
- Default:
45- Description:
- Wait up to this long for the frames. 0-50.
Example
curl https://api.clippie.ai/v1/scene-projects/PROJECT_ID/preview \
-H "Authorization: Bearer $CLIPPIE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'const auth = { Authorization: `Bearer ${process.env.CLIPPIE_API_KEY}` };
const res = await fetch('https://api.clippie.ai/v1/scene-projects/PROJECT_ID/preview', {
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.
From an MCP client
Your AI calls preview_scene with the same fields as JSON arguments. See MCP server to connect one.
{
"name": "preview_scene",
"arguments": {
"projectId": "PROJECT_ID"
}
}