---
title: Use Claude Code as your film editor on an invideo timeline
description: Claude Code cuts your film on an invideo timeline from the transcript, adds sound design and a mixed soundtrack, captions it, checks it and exports it.
---
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](/start/claude-code). The general setup for every client is on [invideo for AI agents](/agents). Then give Claude Code, your agent, a full brief like this one.

```text
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.

<Steps>
<Step title="Make the project and upload the footage">
Claude Code sets up in four calls.

1. It makes a project with `invideo project new`.
2. It registers a name with `invideo agent register` and sets `INVIDEO_AS`.
3. It makes a timeline with `invideo edit new`.
4. 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.
</Step>
<Step title="Work on a branch and get the transcript">
Claude Code creates a branch with `invideo branch new`. Then the agent prices `audio.transcript` with `--dry-run` on 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-credits` set to that price, and calls again after `retry_after_s` for the words. Expected result: every word with its time and speaker.
</Step>
<Step title="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 and `linked_audio` true. It sends the whole scene in one `edit_timeline` call. Expected result: a new `state_token` and the scene in order.
</Step>
<Step title="Design the sound">
Claude Code follows the generation pattern for each sound.

1. It runs `invideo gen models` (`find_models`) with the sound job in words, and reads the inputs of its pick with `invideo gen model` (`get_model`). A good pick for a single sound is `elevenlabs_sfx`, which returns an audio file. A good pick for sound from the picture is `mmaudio_v2.mmaudio_v2_video_to_audio`, which takes the shot as its `video` and returns the shot with its new sound. Your agent can search for others with `find_models`.
2. It runs `invideo gen run` with `--dry-run` and the real inputs, and tells you the price.
3. For a price of 1 credit or more it waits for your yes. Then it runs `invideo gen run` with `--max-credits` set to that price and an `--idempotency-key`. When the result lands, it reads the sequence URL with `invideo notebook show`, and never runs `gen run` again to check.
4. For a shot from `mmaudio_v2.mmaudio_v2_video_to_audio`, it pulls the sound out with `invideo media audio.extract`. The dry run shows its price before anything starts.
5. It places each sound on the effects track `A3` with `insert_media`.

Expected result: a sequence URL per sound, and the sounds on the timeline.
</Step>
<Step title="Mix on buses">
Claude Code creates buses with `create_audio_bus` and routes each track with `set_audio_routing`. It adds `eq` and `compressor` to the dialogue bus with `add_audio_effect`, `ducker` to the music bus, and `limiter` to the timeline. A new timeline ducks under `A1` by default, so the ducker already reacts to the voice on `A1`. In a second call, it sets each effect with `set_audio_effect_parameter` by the ids that `invideo edit show` returns. Expected result: the buses and effects in `get_timeline`.
</Step>
<Step title="Add captions">
Claude Code turns the transcript words into slides and sends `add_captions` with slides and words, in timeline frames. Expected result: a caption clip.
</Step>
<Step title="Check, then export">
Claude Code runs `invideo edit check`, then `invideo edit capture` at each cut and caption, and `invideo media audio.loudness` on the dialogue and music sources. Then it runs `invideo edit export` with `--format video` and `--target-lufs` set to the platform's target. Expected result: an export card with status `completed`, and a list of what needs your eye.
</Step>
</Steps>

The same loop as CLI commands:

```bash
invideo project new --title "Low Tide"
invideo agent register <project-url> --name editor
export INVIDEO_AS=editor
invideo edit new <project-url> --name "Low Tide cut" --fps 24
invideo 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-run
invideo 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_sfx
invideo 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> --wait
invideo notebook show <thread-url>
invideo edit change <branch-url> --timeline T1 --token <state_token> \
  --operations @mix.json
invideo edit check <branch-url>
invideo edit capture <branch-url> --at 0,30,60,90 --out ./frames
invideo edit export <branch-url> --format video --target-lufs -14 --json
invideo status <card-url> --wait
invideo 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.

```json
{
  "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 from `elevenlabs_sfx` or `mmaudio_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 capture` and `invideo edit check`, and every export. `audio.extract` and `audio.loudness` show 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](/account/credits) 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](/start/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.

```text
Open the Low Tide project, start a branch called tighter, and tighten
the beach scene without losing a line. Show me the cuts.
```

```text
Generate foley from the picture for the cabin scene with mmaudio, put it
on the effects bus, and duck it under the dialogue.
```

```text
Make a captions-off version: turn off the caption clip, export, then
turn 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.

## Related

- [Set up invideo in Claude Code](/start/claude-code)
- [Edit a documentary or interview from the transcript, with b-roll and lower thirds](/how-to/film/documentary-and-interview-edit)
- [Clean up the dialogue and keep the original](/how-to/film/dialogue-cleanup)
- [How to add AI sound design to a video](/guides/how-to-add-ai-sound-design-to-a-video-in-invideo-editor)
- [What is audio ducking and when would I use ducker?](/guides/what-is-audio-ducking-and-when-would-i-use-ducker)
- [Check your video before you say it is done](/how-to/check-your-video)