Customize a template you bought
invideo does not open a template you bought. A template from VideoHive, Envato Elements, Motion Array or the CapCut app is a file for another tool. An .aep file opens in After Effects. A .mogrt file opens in Premiere Pro. A CapCut template opens in CapCut. If you have that tool, change the text and photos there. It is the fastest way. A Premiere Pro cut is different from a template: export it as a Final Cut 7 XML with its media, and your agent imports it with import_timeline or invideo edit import. See Use Premiere Pro with invideo.
If you do not have that tool, or you want many versions, your agent can rebuild the look in invideo. It studies the template's preview video and remakes the text, motion and transitions on a timeline. Then it makes one version per name, product or date.
Use invideo for this when you want a template you can change by asking: once the look is on a timeline, each new version is one text change, and your agent makes them all.
Do not publish the seller's preview video. It is a guide for the rebuild, not footage for your video. Read the template's license for what you may copy.
Quickest path
Set up your agent first with invideo for AI agents. Then give it this prompt.
I bought this intro template: ./template/preview.mp4. I do not haveAfter Effects. Rebuild the look in invideo with the fonts in./template/fonts, my logo ./logo.png and the text "Maya Cooks". Matchthe timing of the preview. Then make versions for "Maya Bakes" and"Maya Travels". Show me frames next to the preview.In a chat app, you drag the preview, the fonts and your files into the project's Media panel in invideo. In a terminal, you name the folder and the agent uploads it.
What you need
Most template downloads come with a preview video and a fonts folder. Use those.
- The preview video. The MP4 that shows the template in motion, from the download or the seller's page.
- The fonts. TTF or OTF files from the download, or a link to where the seller says to get them.
- Your content. The text, logo, photos and clips that replace the placeholders.
- The music. The template's track if the license covers it, a track from stock music, or your own file.
- The shape. The shape of the template: 16:9, 9:16 or 1:1.
Steps
Your agent edits on a branch and tells you what changed at each step.
Bring in the preview, fonts and your files
The agent brings each file in with
add_mediaon the timeline URL. A font makes no sequence. Its id in the result'screatedis thefontthatadd_texttakes. Expected result: the preview, your files and the fonts in the media bin.Study the preview and lay it under the rebuild
The agent runs
mediawithvideo.sceneSpliton the preview to find its scenes,video.framesto look at each one, andaudio.beatsfor the timing of its music. It makes a timeline in the template's shape withnew_timelineand a branch withtimeline_history, then places the preview on its own track withinsert_mediaand lowers it withset_opacity, as a guide. Expected result: a list of scenes with times, and the preview on the timeline, faint, to build over.Rebuild the text and shapes
For each scene, the agent adds the text with
add_textand the template's font, then matches the size, color and spacing withset_text_style. It adds bars and boxes withadd_shape, and your logo and photos withinsert_media. For a placeholder shot you do not have, it searchesstock_videofirst. For a shot that stock does not have, it runsfind_modelswith the shot in words and reads its pick withget_model. A good pick isseedance_2_5.frames. Your agent can search for others withfind_models. It callsgeneratewithdry_run: true, apromptand the template'saspect_ratio, and tells you the price. For a price of 1 credit or more it waits for your yes. Then it callsgeneratewithmax_creditsset to that price and anidempotency_key. Expected result: each scene looks like the preview, with your content, and each generated shot is a sequence URL the agent reads withread.Rebuild the motion
The agent fades text in and out with
set_keyframesonopacity, and slides it withadd_keyframe_laneonposition_xorposition_y, thenadd_keyframesfor the points. It picks transitions from the catalog withadd_transition, for exampleslide,zoomorlight_leak, and effects withadd_effect. Expected result: the motion follows the preview's timing.Compare with the preview
The agent runs
captureon the timeline andvideo.frameson the preview at the same times, and compares them by eye. It fixes what is off. Then it turns the guide off withset_clip_enabledset to false. Expected result: frames that match the preview's look, with the guide off.Make every version
The agent copies the finished timeline with
duplicate_timelinefor each version. It changes the words withset_textand swaps photos withplace_mediamodereplace. Expected result: one timeline per version.Check, then export
The agent runs
captureon each version andcheck_timeline. It checks that no text runs off the frame with a longer name. Then it runsexportwith thetimeline_idof each version. Expected result: one export card per version, each with statuscompleted.
The same job from a terminal:
invideo project new --title "Maya intro"invideo agent register <project-url> --name <name>export INVIDEO_AS=<name>invideo edit new <project-url> --name "Intro rebuild"invideo asset upload <edit-url> ./template/preview.mp4 \ ./template/fonts/*.otf ./logo.pnginvideo media video.sceneSplit <sequence-url> --dry-runinvideo media video.frames <sequence-url> --at 0.5,1.5,3 --out ./refinvideo edit catalog <edit-url> --transitions slide,zoom,light_leakinvideo gen models <project-url> --query "short shot from a prompt"invideo gen model <project-url> --model seedance_2_5.framesinvideo gen run <page-url> --model seedance_2_5.frames --dry-run \ -i prompt="hands kneading dough on a floury table" -i aspect_ratio=16:9invideo gen run <page-url> --model seedance_2_5.frames \ --max-credits <price> --idempotency-key placeholder-3 \ -i prompt="hands kneading dough on a floury table" -i aspect_ratio=16:9invideo status <thread-url> --waitinvideo edit show <edit-url> --jsoninvideo branch new <edit-url> --name rebuild --token <state_token>invideo edit show <branch-url> --jsoninvideo edit change <branch-url> --timeline T1 \ --token <state_token> --operations @rebuild.jsoninvideo edit capture <branch-url> --at 0.5,1.5,3 --out ./mineinvideo edit check <branch-url>invideo edit export <branch-url> --format video --quality 1080 \ --timeline <version-id> --jsoninvideo status <card-url> --waitinvideo notebook show <card-url> --out ./outWhere each value comes from:
<name>is the name you choose ininvideo agent register.INVIDEO_ASpasses it to every later command.<project-url>comes frominvideo project new, and<edit-url>frominvideo edit new.<sequence-url>is theurlthatinvideo asset uploadreturns for the preview, a…/notebook/seq-N.MURL.<page-url>is a notebook page of the project, listed byinvideo notebook show <project-url>.<price>is the dry run's.estimated_credits.<thread-url>is theurlthe paid run returns.<state_token>comes frominvideo edit show <edit-url>for the branch command.<branch-url>is the.branch_urlthatinvideo branch newreturns. Foredit change,<state_token>is read again withinvideo edit show <branch-url>.@rebuild.jsonreads a bare JSON list of ops, like theoperationslist of the call below.<version-id>is a version's timeline id, likeT2, thatinvideo edit show <branch-url>lists afterduplicate_timeline.<card-url>is.sequences[0]of the export result.invideo statuswaits but saves nothing.invideo notebook showsaves the video as./out/export.mp4, and the agent renames it per version.
The key MCP call, in full, turns the rebuilt title into a new version. T1 is the finished rebuild. <branch-url> is the branch URL that timeline_history returns, and <state_token> comes from get_timeline on it. <preview-clip-id> is the guide clip's id from get_timeline.
{ "url": "<branch-url>", "timeline_id": "T1", "expected_state_token": "<state_token>", "operations": [ { "op": "set_clip_enabled", "clip": "<preview-clip-id>", "enabled": false }, { "op": "duplicate_timeline", "timeline": "T1", "name": "Maya Bakes" } ]}On the new timeline, the agent sends set_text with the title clip's id and the new words. It reads the ids with get_timeline first.
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: paid stock music or footage, and any shot the agent generates with
seedance_2_5.frames. - Tool ops:
video.sceneSplit,video.frames,audio.beats. The dry run shows its price before anything starts. - Free: uploads, fonts, the rebuild, the versions and every export.
A short intro takes the agent a few minutes to rebuild. A template with many scenes and 3D motion takes longer, and some moves do not carry over. See Credits and what they cost for prices.
If something goes wrong
Most problems come from fonts that are missing, or motion the timeline cannot copy.
| 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. |
invideo status --wait ends and the folder is empty | status does not download. Run invideo notebook show <card-url> --out <dir>. |
| The text uses the wrong font | Bring in the font file with add_media on the timeline URL, then set its id as font with set_text_style. |
| A move in the template looks 3D | Use the nearest transition from the catalog, like cube_3d_rotation or roll_3d, or write one with add_custom_transition. |
| A long name runs off the frame | Lower font_size for that version, then capture again. |
| The guide shows in the export | Turn it off with set_clip_enabled set to false before you export. |
edit_timeline refused with an old token | Read with get_timeline and send the ops again. |
| CLI exit 3 | The timeline changed since your read. Run invideo edit show and rebuild. |
Avoid: telling the person the .aep file opened | Instead: say invideo does not open it, name the tool, and offer the rebuild. |
| Avoid: placing the seller's preview in the final export | Instead: use it as a guide, turned off before the export. |
Prompts to try
Each prompt is a real variation of the job.
I bought a CapCut template but I want it in 16:9. Here is a screenrecording of it, ./capcut.mp4. Rebuild the look in 16:9 with my clips.Rebuild this wedding invitation template from its preview with ournames and date, then make a 9:16 version for WhatsApp.Rebuild this sale promo template from its preview with our products,and make one version for each product in ./products.csv.When to use something else
If you own the tool the template is for, use it. After Effects opens .aep files, Premiere Pro opens .mogrt files, and the CapCut app opens CapCut templates. The template's own controls are faster than a rebuild.
invideo cannot copy particle effects, 3D camera moves or plug-in effects from a template exactly. For those, ask the seller for a version for your tool, or hire an editor who owns that tool.