Finish an AI clip from Higgsfield, Runway or Magnific
You get a finished video from a clip you made in Higgsfield, Runway, Magnific or any other AI video tool. The raw clip gets cuts, sound effects matched to the picture, music, captions or subtitles if someone speaks, your text, and a sharper upscale when you need one. You download an MP4 you can post.
Use invideo for this when the generator gave you a silent or rough clip: your agent adds the sound, the words and the cuts on an editable timeline, and you change any of it after without making the clip again.
Finishing your own AI clips is ordinary video work, and the agent does it. You choose where the video goes and you post it. The agent never publishes it.
Quickest path
Set up your agent first with invideo for AI agents. Then give it this prompt.
Finish my Runway clip ./city-night.mp4. Cut the first second where itwarps, add sound effects that match the picture, a low synth music bed,and the title "Neon Hours" for 2 seconds. Vertical 9:16. Tell me theprice before you generate any sound.In a chat app, you drag the MP4 into the project in invideo, or paste the clip's public link. In a terminal, you name the file and the agent uploads it.
What you need
Download the clip from the generator first, at its best quality.
- The clip. An MP4 or MOV from Higgsfield, Runway, Magnific or another tool. Several clips work too.
- The shape. The clip's own shape, or 9:16, 1:1 or 16:9 for the platform.
- The sound you want. Sound effects matched to the picture, music, a voice, or the clip's own sound.
- The words. A title, a caption style, or a call to action.
- The size. 1080p for social. For 4K, the agent exports at 1080p, then upscales the file.
Steps
The agent looks at and listens to the clip before it edits.
Bring the clip in
The agent makes a project with
new_project, a timeline withnew_timeline, and a branch withtimeline_history. It uploads the clip withstart_uploadandadd_media, or passes a public link asmedia_url. Expected result: a sequence URL for the clip.Look at it and listen to it
The agent runs
mediametadatafor the size, the length and whether there is sound. It runsvideo.framesto see the shots, andaudio.contentto find speech, music or silence. Expected result: a note of the bad frames to cut and whether anyone speaks.Cut the bad frames
The agent places the clip with
place_media, then cuts warped or broken frames withsplit_clipanddelete_clip. For several clips, it splits each one withmediavideo.sceneSplitfirst. Expected result: only the frames you want, in order.Add captions if someone speaks
If
audio.contentshows speech, the agent pricesaudio.transcripton the clip's sequence URL withdry_run, starts it withmax_creditsset to the price it told you, and calls again afterretry_after_sfor the words. Then it adds captions withadd_captions, one slide per line and the words with their times. Expected result: captions that follow the speech.Add sound and music
For sound effects matched to the picture, the agent runs
find_modelswith the job in words, picks one, and reads its inputs withget_model. A good pick ismmaudio_v2.mmaudio_v2_video_to_audio. It callsgeneratewithdry_run: true, the clip's sequence URL asvideoand apromptfor the sound, and tells you the price. Then it callsgeneratewithmax_creditsset to that price and anidempotency_key. It reads the new sequence URL withread, places that clip with its new sound in place of the silent one, adds music fromsearch_libraryinstock_music, and sets the levels withset_audio_gain. Expected result: a sequence URL for the clip with sound, and music under it.Add text and set the shape
The agent adds the title and any call to action with
add_text. For a new shape, it sets the timeline size withset_timeline_settingsand fills the frame withfill_frame. Expected result: text on screen and the shape you asked for.Check, export and upscale
The agent runs
captureat each cut and each text, andcheck_timeline. It runsexportwithformatvideo, which stops at 1080p. For a sharper or 4K copy, it runsmediavideo.upscaleon the export card's URL,dry_runfirst, then withmax_creditsand anidempotency_key. The card is a sequence, so no re-upload is needed. Expected result: an export card with statuscompleted, and an upscaled sequence if you asked for one.
The same job from a terminal:
invideo project new --title "Neon Hours"invideo agent register <project-url> --name <name>export INVIDEO_AS=<name>invideo edit new <project-url> --name "Neon 9x16" --width 1080 --height 1920invideo asset upload <edit-url> ./city-night.mp4invideo media metadata <sequence-url>invideo media audio.content <sequence-url>invideo media video.frames <sequence-url> --at 0,0.5,1,3,6invideo gen models <project-url> --query "sound effects for a video clip"invideo gen model <project-url> --model mmaudio_v2.mmaudio_v2_video_to_audioinvideo gen run <page-url> \ --model mmaudio_v2.mmaudio_v2_video_to_audio \ --dry-run -i video=<sequence-url> -i prompt="rain, distant traffic, neon hum"invideo gen run <page-url> \ --model mmaudio_v2.mmaudio_v2_video_to_audio \ --max-credits <price> --idempotency-key neon-sound-v1 \ -i video=<sequence-url> -i prompt="rain, distant traffic, neon hum"invideo edit show <edit-url> --jsoninvideo branch new <edit-url> --name finish-v1 --token <state_token>invideo edit show <branch-url> --jsoninvideo edit change <branch-url> --timeline T1 --token <state_token> \ --operations @finish.jsoninvideo edit capture <branch-url> --at 0.5,2,5,8 --out ./framesinvideo edit check <branch-url>invideo edit export <branch-url> --format video --quality 1080 --jsoninvideo status <card-url> --waitinvideo media video.upscale <card-url> --dry-runinvideo notebook show <card-url> --out ./outWhere the values come from:
<project-url>comes frominvideo project new, and<edit-url>frominvideo edit new.<name>is the name you choose ininvideo agent register.<page-url>is a notebook page frominvideo notebook show <project-url>.<sequence-url>is the clip's URL frominvideo asset upload.<price>is the dry run's.estimated_credits.<state_token>comes frominvideo edit show <edit-url>, and on the branch frominvideo edit show <branch-url>; the main token is stale there.<branch-url>is the.branch_urlthatinvideo branch newreturns.<card-url>is.sequences[0]of what the export returns.invideo statuswaits and does not download;invideo notebook showsaves the file as./out/export.mp4.- The file
./finish.jsonholds a bare list of operations: theoperationslist of the MCP call below.
The upscale's paid run adds --max-credits with its dry run price and an --idempotency-key. The key MCP call cuts the warped first second and adds the title. <branch-url> is the branch's URL from timeline_history, and <state_token> comes from get_timeline. At 30 frames a second, frame 30 is the one second mark.
{ "url": "<branch-url>", "timeline_id": "T1", "expected_state_token": "<state_token>", "operations": [ { "op": "split_clip", "clip": "c1", "at_f": 30 }, { "op": "delete_clip", "clip": "c1", "mode": "close_gap", "linked": true }, { "op": "add_text", "track": "V2", "start_f": 0, "end_f": 60, "text": "Neon Hours", "style": { "font_size": 96, "align": "center", "color": "#ffffff", "shadow": true } } ]}After split_clip, the left half keeps the id c1 and the right half is a new clip, so delete_clip on c1 removes the first second.
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.
- Free: the upload, the looks and sound reads, the cuts, captions you place, text and the export.
- Costs credits: the transcript, generated sound and music, stock music, a reframe model and the upscale. The upscale charges by each second of the video.
Finishing one clip takes a few minutes. Generated sound and an upscale add the time those models take. See Credits and what they cost for prices.
If something goes wrong
Most problems are a clip with no sound stream, or a warp the agent missed.
| 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. |
Exit code 6, or status is held | A safety review, not a refusal. Wait, then run invideo status <url> --wait again. Do not resend. If it ends failed, change the input the review flagged. |
| You want a generated music bed | Make it with elevenlabs_music_v2_5_instrumental the same way as the sound: find_models, get_model, a dry run, then generate with max_credits and an idempotency_key. |
| A crop to the new shape loses too much | Generate fill with ltx_2_3_pro.reframe the same way, with the shot's sequence URL as video and the new aspect_ratio. |
| The clip has no audio at all | That is normal for many generators. Add sound with mmaudio_v2.mmaudio_v2_video_to_audio or music. |
audio.transcript returns no words | No one speaks. Skip captions, or add a voice with elevenlabs_text_to_speech.elevenlabs_tts_v4. |
| A warp shows mid-clip | Look at more frames with media video.frames, then cut it with split_clip and delete_clip. |
add_media from a link is refused | The link must be public. Download the file and upload it with start_upload. |
| The upscale looks waxy on faces | Try another model from the video.upscale list, such as topaz_proteus_natural. |
timeout on a generation | Do not generate again. read the thread URL or call status. |
| CLI exit 3 on the branch | The token is from main. Run invideo edit show <branch-url> and use its state_token. |
The ./out folder is empty after status | status waits and does not download. Run invideo notebook show <card-url> --out ./out. |
| Avoid: the agent edits the clip without looking | Instead: it reads frames and sound with media first. |
Prompts to try
Each prompt is a real variation of the job.
I have 6 Higgsfield clips in ./shots. Put them in order, cut each toits best 2 seconds on the beat of an upbeat track, and add a logo end card.My Magnific clip has a person talking. Add word-by-word captions inyellow, keep the original sound, and export 1:1 and 9:16.Upscale my finished Runway video to 4K and tell me the price first.When to use something else
To change what happens inside a shot, go back to the generator and make a new take. invideo edits, sounds and finishes the clip you have.
For the tools' own steps, see Use Higgsfield with invideo, Use Runway with invideo and Use Magnific with invideo.