One ReelSDK slideshow call renders a captioned master ad, and one POST /v1/ffmpeg call at $0.02 per compute minute cuts story, feed and square variants from it. All four videos cost about 2.4 cents.
Render ad variants in every size, with their own hooks
ReelSDK gives each placement its own size and hook: 1080x1920 for stories, 1080x1350 for feeds and 1080x1080 for square slots, all written by one request in under 30 seconds.
Use casesUpdated
The request
POST /v1/ffmpeg
Render one master ad, then cut story, feed and square variants with their own hooks from it in a single ffmpeg call.
curl "https://api.reelsdk.com/v1/ffmpeg?wait=300" \
-H "Authorization: Bearer $REELSDK_KEY" \
--json '{
"inputs": {
"master.mp4": "https://api.reelsdk.com/f/lib/out/job_67a39tbltr69mctjcumu/video.mp4"
},
"args": [
"-i", "master.mp4", "-filter_complex",
"[0:v]split=4[a][b][c][d];[a]crop=1080:760:0:0,scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,gblur=sigma=30,eq=brightness=-0.2[bg];[bg][b]overlay=0:420,drawtext=fontfile=/usr/share/fonts/reelsdk/Montserrat-ExtraBold.ttf:text='\''YOUR MORNINGS, SORTED.'\'':fontsize=68:fontcolor=white:x=(w-text_w)/2:y=250,drawtext=fontfile=/usr/share/fonts/reelsdk/Poppins-Bold.ttf:text='\''Shop now'\'':fontsize=56:fontcolor=black:box=1:boxcolor=0xFFE14D:boxborderw=28:x=(w-text_w)/2:y=1620[story];[c]pad=1080:1350:0:270:color=0x1E1B18,drawtext=fontfile=/usr/share/fonts/reelsdk/Montserrat-ExtraBold.ttf:text='\''ONE CAPSULE. EVERY MORNING.'\'':fontsize=60:fontcolor=white:x=(w-text_w)/2:y=105[feed];[d]drawtext=fontfile=/usr/share/fonts/reelsdk/Montserrat-ExtraBold.ttf:text='\''CLEAN INGREDIENTS. NO FILLERS.'\'':fontsize=54:fontcolor=white:box=1:boxcolor=black@0.55:boxborderw=24:x=(w-text_w)/2:y=90:enable='\''lt(t,4)'\''[square]",
"-map", "[story]", "-map", "0:a", "-c:v", "libx264", "-preset",
"medium", "-crf", "21", "-c:a", "copy", "-movflags", "+faststart",
"story-9x16.mp4", "-map", "[feed]", "-map", "0:a", "-c:v", "libx264",
"-preset", "medium", "-crf", "21", "-c:a", "copy", "-movflags",
"+faststart", "feed-4x5.mp4", "-map", "[square]", "-map", "0:a",
"-c:v", "libx264", "-preset", "medium", "-crf", "21", "-c:a", "copy",
"-movflags", "+faststart", "square-1x1.mp4"
],
"outputs": ["story-9x16.mp4", "feed-4x5.mp4", "square-1x1.mp4"]
}'const res = await fetch("https://api.reelsdk.com/v1/ffmpeg?wait=300", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.REELSDK_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"inputs": {
"master.mp4": "https://api.reelsdk.com/f/lib/out/job_67a39tbltr69mctjcumu/video.mp4"
},
"args": [
"-i", "master.mp4", "-filter_complex",
"[0:v]split=4[a][b][c][d];[a]crop=1080:760:0:0,scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,gblur=sigma=30,eq=brightness=-0.2[bg];[bg][b]overlay=0:420,drawtext=fontfile=/usr/share/fonts/reelsdk/Montserrat-ExtraBold.ttf:text='YOUR MORNINGS, SORTED.':fontsize=68:fontcolor=white:x=(w-text_w)/2:y=250,drawtext=fontfile=/usr/share/fonts/reelsdk/Poppins-Bold.ttf:text='Shop now':fontsize=56:fontcolor=black:box=1:boxcolor=0xFFE14D:boxborderw=28:x=(w-text_w)/2:y=1620[story];[c]pad=1080:1350:0:270:color=0x1E1B18,drawtext=fontfile=/usr/share/fonts/reelsdk/Montserrat-ExtraBold.ttf:text='ONE CAPSULE. EVERY MORNING.':fontsize=60:fontcolor=white:x=(w-text_w)/2:y=105[feed];[d]drawtext=fontfile=/usr/share/fonts/reelsdk/Montserrat-ExtraBold.ttf:text='CLEAN INGREDIENTS. NO FILLERS.':fontsize=54:fontcolor=white:box=1:boxcolor=black@0.55:boxborderw=24:x=(w-text_w)/2:y=90:enable='lt(t,4)'[square]",
"-map", "[story]", "-map", "0:a", "-c:v", "libx264", "-preset",
"medium", "-crf", "21", "-c:a", "copy", "-movflags", "+faststart",
"story-9x16.mp4", "-map", "[feed]", "-map", "0:a", "-c:v", "libx264",
"-preset", "medium", "-crf", "21", "-c:a", "copy", "-movflags",
"+faststart", "feed-4x5.mp4", "-map", "[square]", "-map", "0:a",
"-c:v", "libx264", "-preset", "medium", "-crf", "21", "-c:a", "copy",
"-movflags", "+faststart", "square-1x1.mp4"
],
"outputs": ["story-9x16.mp4", "feed-4x5.mp4", "square-1x1.mp4"]
}),
});
const { job } = await res.json();{
"job": {
"id": "job_kc93tpkptawqq02x2lmn",
"op": "ffmpeg",
"status": "succeeded",
"stage": null,
"created_at": "2026-11-07T03:15:37.225Z",
"finished_at": "2026-11-07T03:16:02.037Z",
"outputs": {
"story-9x16.mp4": "https://api.reelsdk.com/f/out/job_kc93tpkptawqq02x2lmn/story-9x16.mp4?s=...",
"feed-4x5.mp4": "https://api.reelsdk.com/f/out/job_kc93tpkptawqq02x2lmn/feed-4x5.mp4?s=...",
"square-1x1.mp4": "https://api.reelsdk.com/f/out/job_kc93tpkptawqq02x2lmn/square-1x1.mp4?s=..."
},
"result": null,
"duration_s": 13.6,
"error": null,
"usage": {
"output_seconds": 40.8,
"audio_seconds": 0,
"tts_characters": 0,
"images": 0
},
"poll_url": "https://api.reelsdk.com/v1/jobs/job_kc93tpkptawqq02x2lmn"
}
}
Step 1: one master with voice and captions
Send POST /v1/slideshow to build the master ad from 5 product photos, music, and a short script read by luna, with bold captions burned in at the bottom. You render this base video at a square 1:1 ratio so it fits inside every placement you make later.
Here the master came back in about 13 seconds and cost about 1.7 cents, most of it for the voiceover.
curl "https://api.reelsdk.com/v1/slideshow?wait=300" \
-H "Authorization: Bearer $REELSDK_KEY" \
--json '{
"images": [
"https://api.reelsdk.com/f/lib/in/shop-bottle/with-water.jpg",
"https://api.reelsdk.com/f/lib/in/shop-bottle/capsules.jpg",
"https://api.reelsdk.com/f/lib/in/shop-bottle/tilted.jpg",
"https://api.reelsdk.com/f/lib/in/shop-bottle/spill.jpg",
"https://api.reelsdk.com/f/lib/in/shop-bottle/bottle.jpg"
],
"size": "1:1",
"voiceover": {
"text": "Meet your new morning habit. One capsule with a glass of water, and you'\''re set for the day. Clean ingredients, no fillers, nothing you can'\''t pronounce. Order today, and your first bottle ships free.",
"voice": "luna"
},
"music": {
"url": "https://api.reelsdk.com/f/lib/music/upbeat/funky-pop.mp3",
"volume": 0.15
},
"captions": {
"preset": "bold",
"position": "bottom"
}
}'At a glance
Three variants from one ffmpeg call
| Output | Size | Hook and layout | File size |
|---|---|---|---|
story-9x16.mp4 | 1080x1920 | YOUR MORNINGS, SORTED. at the top, a yellow Shop now button at the bottom, the master over a blurred copy | 2.7 MB |
feed-4x5.mp4 | 1080x1350 | ONE CAPSULE. EVERY MORNING. on a dark band above the master | 2.1 MB |
square-1x1.mp4 | 1080x1080 | CLEAN INGREDIENTS. NO FILLERS. over the master for the first 4 s | 2.0 MB |
Sources: Sample run, ReelSDK ffmpeg docs, checked November 2026.
All three run the full length of the master, about 14 seconds, with its captions and audio.
Step 2: three variants in one ffmpeg call
Pass the master as an input to POST /v1/ffmpeg and split it 4 ways inside one filter graph. The story cut sits the master on a blurred copy at 1080x1920 with a hook at the top and a Shop now button below, the feed cut pads it to 1080x1350 under a dark band with its own hook, and the 1080x1080 square cut shows its hook over the first 4 seconds.
One ffmpeg job writes 1 to 20 outputs, so another hook is just another branch in the graph. All three cuts came back in about 25 seconds.
Testing hooks at scale
To test a new hook, edit the drawtext lines in the filter graph and send the POST /v1/ffmpeg request again. The master is reused as an input, so a new set of three variants only pays for the ffmpeg call: under a cent here, against about 2.4 cents for the master and the first three cuts.
Every variant keeps the burned-in captions and audio from the master, and the API supports frames up to 8192 px a side and 37.7 megapixels. If you pass arguments outside the allowlist, the endpoint returns a 400 INVALID_REQUEST error right away before any job starts. Check the ffmpeg docs, slideshow docs and pricing for the full specs.
What it costs
What the four videos cost
- Master slideshow, 13.6 s at $0.03 per minute
- $0.0068
- Master voiceover, 198 characters at $0.05 per 1,000
- $0.0099
- Variants, 21.5 s of ffmpeg compute at $0.02 per minute
- $0.0072
- Total
- $0.0239
ffmpeg is billed per second of the time spent fetching inputs, running ffmpeg and storing outputs, with a 1 s minimum. Machine start-up is not billed, and a failed job costs nothing.
Limits
What one request takes
- Inputs
- Up to 50 files
- Outputs
- 1 to 20 files
- Timeout
- timeout_s from 1 to 600
- Frame size
- Up to 8192 px a side and 37.7 megapixels
- Input files
- 500 MB each, 1 GB per job
- Media length
- Up to 15 minutes for captions and slideshows
- Job run time
- Up to 10 minutes
- Concurrent jobs
- 3 per key
- Jobs per day
- 500 per key
- Output retention
- 7 days
How it works
From request to file
Render the master
Call
POST /v1/slideshowwith your 5 product photos, a voiceover, music and captions at1:1.Write the variant graph
Use
spliton the master stream, then runpad,gblur,overlayanddrawtexton each branch for its size and hook.Send POST /v1/ffmpeg
Pass the master URL in
inputsand list every variant file name inoutputsin aPOST /v1/ffmpegrequest.Upload the variants
Copy the rendered files to your ad account before the output links expire after 7 days.
FAQ
Questions, answered
What do the four videos cost?
About 2.4 cents for the master and all three variants. The master with its voiceover is most of that; the ffmpeg call that writes the variants is under a cent.
How many variants can one call write?
An ffmpeg job accepts 1 to 20 outputs, so you can write up to 20 variants in a single call.
Can each variant have different captions?
No, the variants reuse the captions already burned into the master. If you want different spoken lines, render a separate master for each script.
Can I test new hooks without re-rendering the master?
Yes, just change the drawtext text in your ffmpeg call. Since the master is passed as an input, you do not render it again.
How long does it take?
About 13 seconds for the master and about 25 seconds for the three variants.
- Product videos from photosTurn ecommerce product photos into a short video with slide transitions and music, in any feed shape, with one POST.
- Quote videosRender a quote video from text, a background photo and a music track with one ffmpeg call: slow zoom, fade and centred type.
- Bulk video generationTurn every row of a spreadsheet into its own personalized video with a short Node script and one POST per row.
- FFmpeg API: run ffmpeg commands over HTTP, $0.02 a compute minuteRun ffmpeg commands over HTTP: send input URLs and your arguments, get output URLs back. ffmpeg 8.1 on a fresh 4 vCPU machine per job, ready in about 2 s, $0.02 per compute minute.
- FFmpeg API reference: POST /v1/ffmpegPOST /v1/ffmpeg runs ffmpeg 8.1 with your own arguments: up to 50 inputs of 500 MB, 20 outputs and 600 s per command, with tested recipes for GIFs, thumbnails and subtitles.
Ready to build?
Ship video from your app today
Your first $0.50 is free, and one key covers every endpoint.
