Repurpose one video for every platform, one branch each
You repurpose one video for every platform: resize it to each aspect ratio (16:9, 9:16, 4:5, 1:1), keep the face in frame, and move the captions clear of each app's buttons. Each version lives on its own branch of the same timeline, so a fix to one shape never breaks another.
Use invideo for this when you want every version to stay editable: each platform gets a branch, you review each one in the editor, and a late change is the same operations list sent to each branch, not an export per platform to redo by hand.
Quickest path
Set up your agent first with invideo for AI agents. Then give it this prompt.
Repurpose my timeline for YouTube, Shorts, Reels, TikTok and LinkedIn.Make one branch per platform in the right shape, keep my face in frame,put captions where each app's buttons do not cover them, and exporteach one. Show me frames from each branch before you export.In a chat app, you open each branch's URL in invideo to review it. In a terminal, the agent saves frames for each branch to a folder with --out, and you open the folder.
What you need
Start from a finished cut. The agent works from it and never changes it.
- The master timeline. The finished 16:9 cut, on main or on its own branch.
- The platforms. YouTube, YouTube Shorts, Instagram Reels, TikTok, LinkedIn, a feed post.
- The shape for each. 16:9 for YouTube, 9:16 for Shorts, Reels and TikTok, 4:5 or 1:1 for a feed or LinkedIn.
- Captions or not. Most vertical posts are watched with the sound off.
- What to cut, if anything. A shorter version for a platform that favors short posts.
Steps
Your agent works on one branch per platform and tells you what changed on each.
Prepare the branches
The agent prepares the master and one branch per platform first.
Read the master
The agent reads the timeline with
get_timelineand lists the branches withtimeline_history. Expected result: the timeline's tracks and clips, and astate_token.Add captions once, on the master branch
If you want captions, the agent prices
audio.transcripton the voice's sequence URL withdry_run, starts it withmax_credits, and calls again afterretry_after_sfor the words. Then it sendsadd_captions, one slide per phrase withwords. Captions added before branching carry into every branch. Expected result: a caption clip on the master. See the word-by-word captions page for the details.Make one branch per platform
The agent runs
timeline_historywithcreate_branchand anamefor each platform, such as "tiktok-9x16". Each call returns the branch's URL. Expected result: one branch URL per platform. The master stays as it was.Set the shape on each branch
On each branch, the agent runs
set_timeline_settingswith thewidth,heightandfpsfor that shape. Each clip now fits inside the new frame. Expected result: the timeline in the new shape, with bars around the picture.
Reframe and export
Then the agent reframes and checks each branch on its own.
Reframe each shot
The agent fills the frame with
fill_frameon each clip, then moves it withset_positionso the face or the product stays in view. It zooms withset_zoomwhere a shot needs it. For a shot where a crop loses too much, it uses a model that fills the new area with generated picture. The agent runsfind_modelswith "reframe to vertical". A good pick isltx_2_3_pro.reframe, andluma_ray_32.reframeis another. Your agent can search for others withfind_models. The agent reads the pick withget_model, then callsgeneratewithdry_run: true, the source clip's sequence URL asvideoandaspect_ratio9:16. It tells you the price, which goes by source length. For a price of 1 credit or more it waits for your yes. Then it callsgeneratewithmax_creditsset to that price and anidempotency_key, reads the new sequence URL withread, and places it over the old shot. Expected result: every shot full frame, the subject in view.Add safe zones and move the captions
The agent adds guide lines with
create_guidewhere the app's buttons, caption bar and profile name sit, from the platform's own safe-zone guide. Guides show in the editor and do not render. It moves the caption clip above the bottom zone withset_position, and resizes the text withset_text_style. Expected result: captions and titles clear of the guides.Check each branch
The agent runs
captureon each branch at the start, each cut and the end, and runscheck_timeline. It looks for a face cut at an edge and text under a guide. Expected result: frames that look right on every branch.Export each branch
The agent runs
exportwithformatvideo on each branch's URL, with anidempotency_keyper branch, and reads each card until its status iscompleted. Expected result: one 1080p MP4 per platform.
The same job from a terminal, for one platform:
invideo agent register <project-url> --name <name>export INVIDEO_AS=<name>invideo branch list <edit-url>invideo edit show <edit-url> --jsoninvideo branch new <edit-url> --name tiktok-9x16 --token <state_token>invideo edit show <branch-url> --jsoninvideo gen models <project-url> --query "reframe to vertical"invideo gen model <project-url> --model ltx_2_3_pro.reframeinvideo gen run <page-url> --model ltx_2_3_pro.reframe --dry-run \ -i video=<sequence-url> -i aspect_ratio=9:16invideo gen run <page-url> --model ltx_2_3_pro.reframe \ --max-credits <price> --idempotency-key reframe-c1 \ -i video=<sequence-url> -i aspect_ratio=9:16invideo status <thread-url> --waitinvideo notebook show <thread-url>invideo edit change <branch-url> --timeline T1 \ --token <state_token> --operations @tiktok-ops.jsoninvideo edit capture <branch-url> --at 0,5,12,29 --out ./tiktokinvideo edit check <branch-url>invideo edit export <branch-url> --format video --quality 1080 \ --idempotency-key tiktok-v1 --jsoninvideo status <card-url> --waitinvideo notebook show <card-url> --out ./exports/tiktokWhere each value comes from:
<name>is the name you choose ininvideo agent register.INVIDEO_ASpasses it to every later command.<edit-url>is the master timeline's URL, frominvideo edit newor the editor.<project-url>is its project, frominvideo project new.<state_token>comes frominvideo edit show: on<edit-url>for the branch, then on<branch-url>for the change. The main token is stale on the branch.<branch-url>is the.branch_urlthatinvideo branch newreturns, here the TikTok branch.<sequence-url>is the source clip's sequence URL,…/notebook/seq-N.M, frominvideo asset uploadorinvideo notebook show <project-url>.<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 paidgen runreturns, andinvideo notebook showon it lists the new shot's sequence URL.@tiktok-ops.jsonreads a bare JSON list of ops, theoperationslist of the call below.<card-url>is.sequences[0]of the export result.invideo statuswaits but saves nothing.invideo notebook showsaves the video as./exports/tiktok/export.mp4, and the agent renames it.
The key MCP call for a 9:16 branch, shown as the full call, sets the shape, fills and moves one shot, adds two guides and lifts the captions. <branch-url> is the URL timeline_history returns for the branch, and <state_token> comes from get_timeline on it. c1 is a shot and c9 the caption clip, ids from get_timeline. The guide positions here are examples. The agent takes them from the platform's guide.
{ "url": "<branch-url>", "timeline_id": "T1", "expected_state_token": "<state_token>", "operations": [ { "op": "set_timeline_settings", "timeline": "T1", "width": 1080, "height": 1920, "fps": 30 }, { "op": "fill_frame", "clip": "c1" }, { "op": "set_position", "clip": "c1", "x": -140, "y": 0 }, { "op": "create_guide", "timeline": "T1", "orientation": "horizontal", "position": 0.1, "locked": true }, { "op": "create_guide", "timeline": "T1", "orientation": "horizontal", "position": 0.8, "locked": true }, { "op": "set_position", "clip": "c9", "x": 0, "y": 420 } ]}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 branches, the new shapes, the manual reframe, the guides, the checks and every export.
- Costs credits: the transcript for the captions, once, and any shot reframed with
ltx_2_3_pro.reframeorluma_ray_32.reframe. A reframe is priced per second of the source clip.
Each platform version takes the agent a few minutes. See Credits and what they cost for prices.
If something goes wrong
Most problems come from a face that falls out of the new frame, or captions under the app's buttons.
| 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. |
CLI exit 3 on the first change after invideo branch new | The main token is stale on the branch. Run invideo edit show <branch-url> and use its state_token. |
invideo status --wait ends and the folder is empty | status does not download. Run invideo notebook show <card-url> --out <dir>. |
| A face is cut off in the vertical version | Move the clip with set_position, or zoom out with set_zoom, then capture again. |
fill_frame is refused | The clip's zoom is animated. Remove the zoom lane, or set the size with set_zoom. |
| The reframe model refuses the clip | The clip is too long or in a format it does not take. Read its limits with get_model, or split the clip and reframe the parts. |
| Captions sit under the app's buttons | Move the caption clip up with set_position, inside the guides. |
| A fix seems to show on the wrong branch | Branches are separate. Read the branch URL you mean with get_timeline and check its name. |
create_branch refused as stale | Someone edited since your read. Read again and use the new state_token. |
| CLI exit 3 | The timeline changed since your read. Run invideo edit show again. |
| Avoid: the agent edits main to make the vertical cut | Instead: one branch per platform, and the master stays as it is. |
Avoid: running export again to check on it | Instead: read the export card, or run invideo status --wait. |
Prompts to try
Each prompt is a real variation of the job.
Make a 9:16 and a 1:1 version of this cut, on two branches. On the 9:16one, put the captions in the upper middle, and keep the speaker's facein the top half.Make a LinkedIn version of my YouTube video: 1:1, the first 60 secondsonly, bold captions on, no end screen. Leave the YouTube cut as it is.My main cut changed at 0:42. Apply the same change to every platformbranch and export them all again.When to use something else
invideo does not post to the platforms. Upload each export in the app, or use a scheduler such as Buffer or Later. A reframe model does not track a face. It fills new picture around the shot. For a crop that follows a moving face shot by shot, the agent sets set_position per shot, or you finish that shot in an editor with face tracking, such as CapCut or DaVinci Resolve.