Use Claude Code as your film editor on an invideo timeline
You get Claude Code working as your film editor, also called an AI video editor or an agentic editor. It reads your footage folder, cuts the film on an invideo timeline from the transcript, designs the sound, mixes dialogue, music and effects on buses, adds captions, checks the result and exports it. You watch every edit land in the browser and change anything by hand.
Use invideo for this when you want Claude Code to do the editing on a real timeline: every cut, sound and caption is a timeline object you can move, and each round of changes sits on its own branch for you to review.
Quickest path
Set up invideo in Claude Code first with Set up invideo in Claude Code. The general setup for every client is on invideo for AI agents. Then give Claude Code, your agent, a full brief like this one.
You are my film editor. The footage for my short "Low Tide" is in./footage, with the script in ./script.pdf. Make an invideo project,upload everything, and work on a branch called first-cut.1. Transcribe the dialogue. Tell me the price first.2. Cut the film in script order. Pick the take with the cleanest read of each line. Keep a beat of air after each line.3. Design the sound: waves and gulls under the beach scenes, a door creak at the cabin. Generate what you need, price it first.4. Mix on buses for dialogue, music and effects. Compress and EQ the dialogue, duck the music under it, limit the master.5. Add captions from the transcript.6. Check every cut and the loudness, then export at the loudness target of the platform.Give me the timeline URL and a list of what needs my eye.In Claude Code the agent names the folder and uploads the files itself. In a chat app, you drag the files into the project and the rest is the same.
What you need
Claude Code works from files on your machine, so keep them in one folder.
- The footage. Camera files, with sound or with separate sound files.
- The script or an outline. So the agent can cut in story order.
- Music. Your track, or words for the mood if the agent should find stock or generate it.
- The sound you want. Places and moments: "waves under the beach", "a door creak at 02:10".
- The delivery. The shape, the frame rate, and the loudness target of the platform.
Steps
Claude Code uses the invideo CLI for this whole loop. It works on a branch and tells you what changed after each step.
Make the project and upload the footage
Claude Code sets up in four calls.
- It makes a project with
invideo project new. - It registers a name with
invideo agent registerand setsINVIDEO_AS. - It makes a timeline with
invideo edit new. - It uploads the footage folder into the timeline's media bin with
invideo asset upload.
Expected result: a sequence URL and a media bin id for every file.
- It makes a project with
Work on a branch and get the transcript
Claude Code creates a branch with
invideo branch new. Then the agent pricesaudio.transcriptwith--dry-runon each dialogue file's sequence URL from the upload, and tells you the price. For a price of 1 credit or more it waits for your yes. Then it starts the transcript with--max-creditsset to that price, and calls again afterretry_after_sfor the words. Expected result: every word with its time and speaker.Make the cut
Claude Code reads the transcript against the script and picks a take for each line. It places each take with
place_media, with the source start and end of the line andlinked_audiotrue. It sends the whole scene in oneedit_timelinecall. Expected result: a newstate_tokenand the scene in order.Design the sound
Claude Code follows the generation pattern for each sound.
- It runs
invideo gen models(find_models) with the sound job in words, and reads the inputs of its pick withinvideo gen model(get_model). A good pick for a single sound iselevenlabs_sfx, which returns an audio file. A good pick for sound from the picture ismmaudio_v2.mmaudio_v2_video_to_audio, which takes the shot as itsvideoand returns the shot with its new sound. Your agent can search for others withfind_models. - It runs
invideo gen runwith--dry-runand the real inputs, and tells you the price. - For a price of 1 credit or more it waits for your yes. Then it runs
invideo gen runwith--max-creditsset to that price and an--idempotency-key. When the result lands, it reads the sequence URL withinvideo notebook show, and never runsgen runagain to check. - For a shot from
mmaudio_v2.mmaudio_v2_video_to_audio, it pulls the sound out withinvideo media audio.extract. The dry run shows its price before anything starts. - It places each sound on the effects track
A3withinsert_media.
Expected result: a sequence URL per sound, and the sounds on the timeline.
- It runs
Mix on buses
Claude Code creates buses with
create_audio_busand routes each track withset_audio_routing. It addseqandcompressorto the dialogue bus withadd_audio_effect,duckerto the music bus, andlimiterto the timeline. A new timeline ducks underA1by default, so the ducker already reacts to the voice onA1. In a second call, it sets each effect withset_audio_effect_parameterby the ids thatinvideo edit showreturns. Expected result: the buses and effects inget_timeline.Add captions
Claude Code turns the transcript words into slides and sends
add_captionswith slides and words, in timeline frames. Expected result: a caption clip.Check, then export
Claude Code runs
invideo edit check, theninvideo edit captureat each cut and caption, andinvideo media audio.loudnesson the dialogue and music sources. Then it runsinvideo edit exportwith--format videoand--target-lufsset to the platform's target. Expected result: an export card with statuscompleted, and a list of what needs your eye.
The same loop as CLI commands:
invideo project new --title "Low Tide"invideo agent register <project-url> --name editorexport INVIDEO_AS=editorinvideo edit new <project-url> --name "Low Tide cut" --fps 24invideo asset upload <edit-url> ./footage/*invideo edit show <edit-url>invideo branch new <edit-url> --name first-cut --token <state_token>invideo edit show <branch-url>invideo media audio.transcript <sequence-url> --dry-runinvideo media audio.transcript <sequence-url> --max-credits <price>invideo gen models <project-url> --query "door creak sound effect"invideo gen model <project-url> --model elevenlabs_sfxinvideo gen run <page-url> --model elevenlabs_sfx --dry-run \ -i prompt="old wooden door creaks open slowly"invideo gen run <page-url> --model elevenlabs_sfx \ --max-credits <price> --idempotency-key door-creak \ -i prompt="old wooden door creaks open slowly"invideo status <thread-url> --waitinvideo notebook show <thread-url>invideo edit change <branch-url> --timeline T1 --token <state_token> \ --operations @mix.jsoninvideo edit check <branch-url>invideo edit capture <branch-url> --at 0,30,60,90 --out ./framesinvideo edit export <branch-url> --format video --target-lufs -14 --jsoninvideo status <card-url> --waitinvideo notebook show <card-url> --out .Where the values come from: <project-url> from invideo project new, and <edit-url> from invideo edit new. <state_token> comes from invideo edit show on the URL the next command runs on: <edit-url> for branch new, then <branch-url>, read fresh, because the main token is stale on the branch. <branch-url> is the branch_url that branch new returns. <sequence-url> is the url that invideo asset upload returns for a dialogue file. <price> is the price each dry run returns, its estimated_credits or credits. <thread-url> is the url of the paid gen run. <page-url> comes from invideo notebook show <project-url>. <card-url> is .sequences[0] of the export answer. invideo status waits but does not download. notebook show with --out saves the file as export.mp4.
The key edit sets up the mix. This fence is the full MCP edit_timeline call. The file in --operations @mix.json holds only its operations list, as a bare list. The new timeline has A1 for voice, A2 for music and A3 for effects.
{ "url": "<branch-url>", "timeline_id": "T1", "expected_state_token": "<state_token>", "operations": [ { "op": "create_audio_bus", "timeline": "T1", "name": "Dialogue" }, { "op": "create_audio_bus", "timeline": "T1", "name": "Music" }, { "op": "add_audio_effect", "target": "A2", "target_kind": "track", "effect": "ducker" }, { "op": "add_audio_effect", "target": "A1", "target_kind": "track", "effect": "compressor" }, { "op": "add_audio_effect", "target": "T1", "target_kind": "timeline", "effect": "limiter" } ]}The buses and effects get their ids when this call lands. Claude Code reads them with invideo edit show. In the next call it routes the tracks to the buses with set_audio_routing. The ducker already reacts to the voice on A1, the default sidechain source of a new timeline.
Cost and time
Edits and exports are free. Generation and transcripts cost credits. Paid stock costs a small credit charge, or one of your workspace's iStock licenses. Your agent runs a dry run first and tells you the price before it spends anything.
- Costs credits: the transcript with
audio.transcript, each sound fromelevenlabs_sfxormmaudio_v2.mmaudio_v2_video_to_audio, generated music, and stock you place. - Free: uploads, every edit (the cut, the buses and audio effects, captions), checks with
invideo edit captureandinvideo edit check, and every export.audio.extractandaudio.loudnessshow their price in the dry run before anything starts.
A short film's first cut takes Claude Code under an hour. Your review takes the longest. See Credits and what they cost for prices.
If something goes wrong
Most problems come from sign-in, a stale token, or mixing MCP and the CLI.
| Symptom | Fix |
|---|---|
get_model or generate refuses the model as not found | Models retire. Run find_models with the job in words, use the best match, and tell the person which model you used. |
invideo: command not found | The CLI is not on PATH. Install it as Set up invideo in Claude Code shows, then run invideo --version. |
edit_timeline refused with an old token | Someone edited first. Read with get_timeline, then rebuild the ops. |
completion_unknown or a timeout on an edit | Retry the identical request with the same token. A conflict means it landed. |
| The transcript returns status running | Call audio.transcript again after retry_after_s. Only the first call costs credits. |
| The music does not duck | A new timeline ducks under A1. If the dialogue sits on another track, point the ducker at it with set_sidechain_source. |
audio.transcript is refused as not_found | It got a bin id like m1. Pass the file's sequence URL instead. |
mmaudio_v2.mmaudio_v2_video_to_audio returns a video, not a sound | The model returns the shot with its new sound. Pull the sound out with invideo media audio.extract. |
The output folder is empty after status | status does not download. Run invideo notebook show <card-url> --out .. |
| CLI exit 4 | Not signed in. Run invideo auth login. |
| Avoid: mixing MCP tools and the CLI in one session | Instead: pick one per session. |
| Avoid: saying done after the last edit | Instead: capture and check_timeline first. |
| Avoid: editing main | Instead: a branch per round of changes. You decide what goes to main. |
Prompts to try
Each prompt is a real variation of the job.
Open the Low Tide project, start a branch called tighter, and tightenthe beach scene without losing a line. Show me the cuts.Generate foley from the picture for the cabin scene with mmaudio, put iton the effects bus, and duck it under the dialogue.Make a captions-off version: turn off the caption clip, export, thenturn it back on. Give me both files.When to use something else
For a surround mix or a final mix to a broadcast spec, export the audio with export mode audio, or the project with format premiere or davinci, and mix in a DAW like Pro Tools.
For a feature-length film with many reels, the agent works one reel per timeline. Join the reels in your finishing tool.