|Docs

Use ChatCut with invideo

It depends on where you want to cut. ChatCut edits video by its transcript, so you delete words and reorder paragraphs and the timeline follows; invideo adds generation, stock, music and a project that people and agents edit together, and it can do the transcript edit too.

When to use both

Use both when the transcript cut is done in ChatCut and the rest of the video is not.

  • Generated shots and stock. A missing shot, a product close-up or b-roll comes from a model or the stock library in the same project.
  • Music and voice. A music bed and a voice-over go on their own tracks and get mixed there.
  • Collaboration. Agents and people work in the same invideo project, and the person reviews each branch in the browser.
  • Variants. Several hooks, shapes or end cards around the same cut, each on its own branch.

Hand-off: from ChatCut into invideo

The cut comes in as an MP4. Export the finished cut from ChatCut as a video file, from the ChatCut desktop app or the web app at app.chatcut.io. ChatCut's docs also list an XML export for Premiere Pro and DaVinci Resolve, and an editable CapCut draft from ChatCut Desktop. invideo takes the video file, not the XML.

Then your agent brings the MP4 into invideo:

  • A public link. add_media with media_url.
  • A file on your computer. start_upload with the file_name, a PUT of the bytes to the upload_url, then add_media with the upload_id. In a terminal, invideo asset upload <project-url> <file>.
  • A file in a chat app. You drag the file into the chat. It arrives through file on add_media.

Each file becomes a sequence in the project, with its own sequence URL. On a timeline's URL, add_media also puts it in that timeline's media bin.

The agent places the cut with place_media and linked_audio set to true, so the voice comes with the picture.

Then the finish:

  • Stock from search_library in stock_video, added with add_media and stock, then placed with place_media mode place_on_top.
  • Generated shots from a model such as seedance_2_5.r2v with generate, priced with dry_run first.
  • Music from search_library in stock_music, added with add_media and stock, under the voice with the ducker audio effect.
  • Captions with media audio.transcript on the cut, then add_captions.

Hand-off: from invideo to ChatCut

The way back is an MP4. export with format video renders the timeline, and you bring the file into ChatCut as footage. When the cut goes on to an editor, export with format premiere, davinci or final_cut makes a project file for Premiere Pro, DaVinci Resolve or Final Cut Pro.

The transcript edit inside invideo

You can also do the transcript cut in invideo and skip the hand-off. Your agent reads the words, picks what to cut, and cuts it on the timeline.

  1. The agent prices media audio.transcript with dry_run, then runs it on the clip. It gets every word with its time and speaker.
  2. The agent runs audio.content for the spans of speech and silence.
  3. The agent picks the ums, retakes and long pauses to cut, by reading the words.
  4. The agent cuts each span with edit_time_range mode close_gap, all in one edit_timeline call, ordered last span first. Each closed gap moves everything after it earlier, so cutting from the end keeps the earlier frame numbers true.

Times in edit_time_range are frames, so the agent multiplies the transcript's seconds by the timeline's fps. The full recipe is on Cut ums and retakes.

Steps

Your agent sets up with invideo for AI agents first. Then it runs these steps for the hand-off.

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.

Your agent runs a dry run first. For any call that costs 1 credit or more, it tells you the price and waits for your yes. A call under 1 credit runs without asking, and your agent tells you what it cost.

  1. Export the cut from ChatCut

    You or your agent export the cut as a video file. Expected result: an MP4 on disk.

  2. Bring the cut in

    The agent calls start_upload, puts the bytes, then add_media on the timeline URL. Expected result: a sequence URL and a media bin id.

  3. Finish on a branch

    The agent creates a branch with timeline_history, adds stock and music with add_media and stock, then places the cut, stock and music with edit_timeline. Expected result: a new state_token.

  4. Pick and price the shot

    The agent runs find_models with the missing shot in words, picks one, and reads its inputs with get_model. A good pick is seedance_2_5.r2v. The agent can search for others with find_models. It calls generate with dry_run: true and the real inputs, and tells you the price. Expected result: a price and no charge.

  5. Make the shot

    The agent calls generate with max_credits set to that price and an idempotency_key. Expected result: a thread URL, then a sequence URL when the shot lands. The agent reads that URL with read, and never calls generate again to check.

  6. Caption the cut

    The agent prices audio.transcript with dry_run, starts it, and calls again after retry_after_s for the words. Then it sends add_captions. Expected result: a caption clip.

  7. Check and export

    The agent calls capture at each join and runs check_timeline. Then it calls export. Expected result: an export card with status completed.

A missing shot from a terminal:

invideo agent register <project-url> --name <name>export INVIDEO_AS=<name>invideo gen models <project-url> --query "close-up of the product on a desk"invideo gen model <project-url> --model seedance_2_5.r2vinvideo gen run <page-url> --model seedance_2_5.r2v --dry-run \  -i prompt="close-up of the product on a desk"invideo gen run <page-url> --model seedance_2_5.r2v \  -i prompt="close-up of the product on a desk" \  --max-credits <price> --idempotency-key shot-1

<project-url> comes from invideo project new or list_projects. <name> is the name you choose in invideo agent register. <page-url> is a page that invideo notebook show <project-url> lists. <price> is the price the dry run returns.

When to stay in ChatCut

Stay in ChatCut when you want to cut by editing text with your own hands, in its transcript panel. Stay there too when the cut goes on to Premiere Pro or DaVinci Resolve through ChatCut's XML export, or to CapCut as a ChatCut Desktop draft.

If something goes wrong

SymptomFix
add_media with media_url is refusedThe link must be public. Download the file, then upload it with start_upload and add_media with the upload_id.
add_media refuses ChatCut's XML exportinvideo takes video, image and audio files. Export the cut from ChatCut as an MP4.
get_model or generate refuses the model as not foundModels retire. Run find_models with the job in words, use the best match, and tell the person which model you used.
Avoid: call generate again to check on a runInstead: read the thread or sequence URL with read. A second generate starts a second paid run.