Docs / Operate
Code video and hybrid video
5 minute read · Updated 2026-10-13
A code video is written, not prompted: the model writes an HTML page that draws every frame as a function of song time, a separate critic looks at rendered stills and asks for fixes, and the final page is rendered frame by frame with the song muxed in. Code-only videos use no image or video model at all.
How it works
- 01
Kit
The song window (5–60 s) is analysed: beats and onsets (aubio), loudness in three bands per frame, loud/quiet sections across the whole song, and the word-timed lyrics in the window.
- 02
Plan
The Composer writes a treatment. In hybrid mode it also commissions up to 4 images and 2 image-to-video clips, which are generated and saved to your library first.
- 03
Write, critique, revise
The Composer writes the page. Stills are rendered at the open, each section change, the middle and the end; the Critic reviews them as a contact sheet; the Composer revises. A revision only replaces the page if it renders.
- 04
Render
Every frame is rendered in an isolated browser with no network, the song is muxed in, and the video is saved with its full recipe (model, rounds, critic scores, the page itself, and what it composites).
Parameters
| Field | Meaning |
|---|---|
| song_id, start_seconds, end_seconds | The window. 5–60 seconds. |
| mode | 'code' (default) — every frame is code. 'hybrid' — code plus generated images/clips. |
| format | '9:16' (default, 1080×1920) or '16:9' (1920×1080). |
| lyrics | 'none' (default) keeps the frame free of text for Lyric Studio; 'burn' animates the lyrics on their word timings. |
| brief | What you want, in your own words. Optional. |
| artstyle_id | Follow an artstyle’s look; hybrid images use its prompt suffix. |
| text_model | An OpenRouter model; default anthropic/claude-sonnet-5.5. |
| critique_rounds | 0–2, default 1. |
| max_images, max_clips, image_model, video_model | Hybrid only. |
What it costs
The job reserves the render fee and, in hybrid mode, the commissioned media at their model prices. The Composer and Critic are billed per call at their real token cost, like every other text call. Cancelling refunds whatever was not used.
A code-only 30-second video on the default model typically costs well under a dollar in tokens plus a few credits of render time. Rendering takes several minutes.