Make a stock-footage commercial for your business, in short and long cuts
You get a commercial for your business, also called a promo video or explainer ad, built from licensed stock footage. It has a voiceover, your business name and offer on screen, music, and a call to action. You get it in three lengths, 15, 60 and 120 seconds, each on its own branch.
Use invideo for this when you have no footage of your own: your agent searches stock video, images and music that are licensed for the video, and you can swap any shot on the timeline after the first cut.
This is ordinary marketing work for your own business. The agent makes the video. You publish it, and you choose where it runs.
Quickest path
Set up your agent first with invideo for AI agents. Then give it this prompt.
Make a commercial for my bakery, Rise and Crumb, in Austin. Fresh breadevery morning, custom cakes, open 7am to 3pm. Use stock footage andwarm music, a friendly voice, and end with my address and site.Make 15, 60 and 120 second versions. Tell me the stock price first.The chat-app path and the terminal path are the same here. You type the facts, and the agent finds the media. In a terminal it can also read your facts from a file.
What you need
The agent writes only what you give it. Bring the facts.
- Your business facts. The name, what you sell, what makes you different, the offer, and the call to action.
- The words to show. The address, the phone number or the site, exactly as they should appear.
- Your logo, if you have one. A PNG with a transparent background.
- The shape. 16:9 for YouTube or a site, 9:16 for Reels and TikTok, 1:1 for feeds.
- The mood. Warm, upbeat, calm or bold, for the shots, the voice and the music.
Steps
The agent builds the longest version first, then cuts it down on branches.
Write the script for each length
The agent writes three scripts from your facts: a short one for 15 seconds, a full one for 60 and a longer one for 120 seconds. Each ends with the call to action. It shows you the scripts first. Expected result: three scripts you approve.
Find the stock
The agent runs
search_libraryinstock_videofor each line of the script, and instock_imageandstock_musicwhere it needs them. It looks closer at a result withmediavideo.framesand thestockid. Searching is free. Expected result: a shot list with a stock id per line, and a music track.Make the voice
The agent runs
find_modelswith the job in words, picks one, and reads its inputs withget_model. A good pick iselevenlabs_text_to_speech.elevenlabs_tts_v4. A voice id works only with its own model, so the agent picks the voice withsearch_libraryinelevenlabs_text_to_speech_voices. It callsgeneratewithdry_run: true, the script aspromptand thevoice_id, and tells you the price. Then it callsgeneratewithmax_creditsset to that price and anidempotency_key. It does this once per script, with one key per script. Expected result: three sequence URLs, one per length, which the agent reads withread.Build the 120 second version
The agent makes a timeline with
new_timelineand a branch named120swithtimeline_history. It adds each chosen stock result withadd_mediaand thestockid, which charges its cost. It places shots withplace_mediaalong the voice and adds your words withadd_text. Expected result: a full commercial with every shot on the voice line it fits.Cut the 60 and 15 second versions
The agent makes branches named
60sand15swithtimeline_historycreate_branch. On each, it puts that length's voice in place withplace_mediainmodereplace, removes shots withdelete_clip, and shortens the rest withtrim_clip. Expected result: three branches whose lengths match their names.Add music, the logo and the end card
The agent places the music with
place_mediaand sets it under the voice withset_audio_gain. It fades the music out withset_audio_fades. It adds your logo withinsert_mediaand the address and site on the last seconds withadd_text. Expected result: music under the voice, and an end card with your details.Check and export each length
The agent runs
captureat every text and at the end card of each branch, andcheck_timeline. It checks that your address and phone number read exactly as you gave them. Then it runsexporton each branch URL withformatvideo and afile_namesuch asrise-and-crumb_60s. Expected result: three export cards with statuscompleted.
The same job from a terminal:
invideo project new --title "Rise and Crumb commercial"invideo agent register <project-url> --name <name>export INVIDEO_AS=<name>invideo library search <project-url> --library stock_video \ --query "baker pulling fresh bread from oven"invideo library search <project-url> --library stock_music \ --query "warm acoustic"invideo media video.frames <project-url> --stock <stock-id> --at 1,3,5invideo gen models <project-url> --query "friendly voiceover from a script"invideo gen model <project-url> \ --model elevenlabs_text_to_speech.elevenlabs_tts_v4invideo gen run <page-url> \ --model elevenlabs_text_to_speech.elevenlabs_tts_v4 \ --dry-run -i prompt=@script-60.txt -i voice_id=<voice-id>invideo gen run <page-url> \ --model elevenlabs_text_to_speech.elevenlabs_tts_v4 \ --max-credits <price> --idempotency-key crumb-voice-60-v1 \ -i prompt=@script-60.txt -i voice_id=<voice-id>invideo edit new <project-url> --name "Rise and Crumb 120s"invideo asset add <edit-url> --stock <stock-id>invideo edit show <edit-url> --jsoninvideo branch new <edit-url> --name 60s --token <state_token>invideo edit show <branch-url> --jsoninvideo edit change <branch-url> --timeline T1 --token <state_token> \ --operations @cut-60.jsoninvideo edit capture <branch-url> --at 2,20,40,58 --out ./frames/60sinvideo edit export <branch-url> --format video --quality 1080 \ --file-name rise-and-crumb_60s --jsoninvideo status <card-url> --waitinvideo notebook show <card-url> --out ./out/60smv ./out/60s/export.mp4 ./out/60s/rise-and-crumb_60s.mp4Where the values come from: <project-url> from invideo project new, and <edit-url> from invideo edit new. <name> is the name you choose in invideo agent register, and <page-url> is a notebook page from invideo notebook show <project-url>. <stock-id> comes from the library search, and <voice-id> from invideo library search in elevenlabs_text_to_speech_voices. <price> is the dry run's estimated_credits. <state_token> comes from invideo edit show on the edit, and on the branch from invideo edit show <branch-url>. The main token is stale there. <branch-url> is the branch_url that invideo branch new returns. <card-url> is .sequences[0] of what the export returns. invideo status does not download, and the saved file is always export.mp4. The ops file cut-60.json is a bare list: the operations list of the MCP call below.
The key MCP call on the 60s branch removes a shot, shortens another and adds the end card. At 30 frames a second, frame 1800 is the 60 second mark. <state_token> here is the branch's token from get_timeline, and the clip ids come from the same read.
{ "url": "<branch-url>", "timeline_id": "T1", "expected_state_token": "<state_token>", "operations": [ { "op": "delete_clip", "clip": "c6", "mode": "close_gap", "linked": true }, { "op": "trim_clip", "clip": "c7", "edge": "tail", "from_f": 1290, "to_f": 1200, "mode": "close_gap", "linked": true }, { "op": "add_text", "track": "V2", "start_f": 1650, "end_f": 1800, "text": "Rise and Crumb\n214 Oak Street, Austin\nriseandcrumb.com", "style": { "font_size": 64, "align": "center", "color": "#ffffff" } } ]}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: searching stock, the edits, the three branches and every export.
- Looking at stock with
media: the dry run shows the price before anything starts. - Costs credits: each stock clip, image or song when the agent adds it, and the voice. iStock results use one of your workspace's iStock licenses.
One commercial in three lengths takes under an hour, most of it on the script and your review of the shots. See Credits and what they cost for prices.
Rights
Stock you add through invideo is licensed for use in your video. The agent looks at low-resolution previews. Your export uses the clean file. For what you may do with stock, music and generated media, read Licensing and commercial use.
If something goes wrong
Most problems are a shot that does not fit the line, or a version that runs long.
| 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. |
| A version runs longer than its name | Read it with get_timeline and trim the last clips with trim_clip. |
trim_clip refused as stale | from_f must be the edge as last read. Read the clip again. |
| A stock shot shows a competitor's logo | Pick another result with search_library. |
| The phone number on screen is wrong | The agent types what you gave. Send the right number and it fixes it with set_text. |
| CLI exit 3 on the branch | The token is the main timeline's. Run invideo edit show <branch-url> and use its token. |
| The download folder is empty | invideo status does not download. Run invideo notebook show <card-url> --out ./out/60s. |
| CLI exit 5 | A credit limit. Use fewer stock clips, or reuse a clip. |
| Avoid: adding every search result to look at it | Instead: look with media and the stock id, then add the ones you pick. |
Prompts to try
Each prompt is a real variation of the job.
Make a 30 second vertical promo for my gym's January offer: first monthfree. Energetic stock, bold text, no voice, a fast beat.Make a 60 second commercial for my plumbing business with a calm malevoice. Use my logo ./logo.png and my real van photo ./van.jpg at the end.Use my 120 second cafe commercial and make a Spanish version on a newbranch, with a Spanish voice and the same shots.When to use something else
For a commercial with your own staff, shop and customers, film them on a phone and bring the clips in with add_media. Real footage often wins over stock for a local business.
For airtime on TV, the station sets its own delivery rules. invideo exports a 1080p MP4. Ask the station what it needs, and use a desktop editor or a post house for broadcast formats.