Trim a 10 s moment and stack a product still: two jobs, $0.04
Video trim ($0.02) cuts the moment, and Timeline compose ($0.02) stacks a still above it as a 9:16 MP4. A 200-clip batch is $8.00 in worker jobs.

To cut a 10-second moment out of a longer clip and put a product still on screen with it, run two jobs: video trim at $0.02 and Timeline compose at $0.02, which is $0.04 per finished clip. Compose returns one MP4 whose length comes from the video layer, at 1080 by 1920 unless you set otherwise. Two hundred clips are $8.00 in these two job types.
The two steps
Trim writes a new MP4 for the range, and its video_url goes straight into compose as video.url. Compose needs a still and a video that are both on this workspace's media host, and it is priced flat because the duration may not be known before the worker probes the file.
| Step | Route | Price | Key limit |
|---|---|---|---|
| 1. Cut the moment | POST /v1/video-trim | $0.02 | source up to 1,800 s, output 0.2 to 900 s |
| 2. Add the still | POST /v1/timeline-1.0/compose | $0.02 | output up to 300 s |
| Total per clip | $0.04 | ||
| 200 clips | $8.00 | 400 jobs |
Layout choices in compose
The operation is stack or overlay. Stack tiles a region for the still and the rest for the video. With the default ratio of 0.5 on a 1080 by 1920 frame, each takes half the height. Overlay lays the still on the video, with width_ratio from 0.05 to 1 (default 0.9) and a margin_ratio from 0 to 0.45.
- Set output.width and output.height to the timeline you will assemble into, so the shot is not rescaled twice.
- A silent source produces a compose_video_has_no_audio warning, not a failure.
- If video.duration runs past the file, the job clamps and warns compose_duration_clamped_to_source.
Compose request
Use the trim result for video.url once the trim job is result_ready.
curl -X POST https://api.sume.com/v1/timeline-1.0/compose \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: compose-clip-014" \
-d '{
"operation": "stack",
"image": { "url": "https://media.sume.com/artifacts/artf_demo/product.png" },
"video": { "url": "https://media.sume.com/artifacts/artf_demo/trimmed.mp4" },
"layout": { "split": "horizontal", "image_region": "top", "ratio": 0.35 }
}'Then assemble
Put the compose result into Timeline 1.0 video[] to sequence several finished shots. That render is $0.10 per output minute, rounded up, so ten 10-second shots (100 seconds) render for $0.20.
Failure modes
Two refusals are worth knowing. Compose answers compose_image_not_still if image.url is not a still, and compose_video_not_video if video.url is not a video. A stack layout with left or right on a horizontal split returns compose_image_region_wrong_axis. On the trim side, an end past the source clamps with a trim_clamped_to_source warning, so a short source gives a short clip instead of an error.
Neither job calls a provider model. They run ffmpeg on the worker, so there is no model cost to add to the $0.04.
Sources
Related posts
More in Media tools
- Trim a 200-second take to a 180-second YouTube Short for 2 cents
YouTube Shorts can run up to three minutes. A 200-second take needs one exact video-trim job (start 0, duration 180) at $0.02. Here is the request.
- Trim a Reel clip's dead start and end from first and last word
Take the first word's start and the last word's end from STT, then add 0.15 s lead and 0.30 s tail: a 29.9 s clip becomes 1.69-27.92 s for $0.03.
- Trim end 184 on a 172-second source: it clamps and warns, no error
Video trim clamps an end past the source length and returns warning trim_clamped_to_source. A 4 to 184 cut of a 172.4 s clip yields 168.4 s for $0.02.
- Trim the first 0.6 s off an avatar clip: exact vs keyframe, $0.02
Cut a lead-in off a 22-second Sume avatar video with video-trim: exact re-encode or keyframe copy, what actual_start_seconds means, and the total cost.
Written by Sume