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.

5 min readSume
All posts

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.

Per-clip cost, Sume public job rates (read 2026-10-08, docs read 2026-10-09).
StepRoutePriceKey limit
1. Cut the momentPOST /v1/video-trim$0.02source up to 1,800 s, output 0.2 to 900 s
2. Add the stillPOST /v1/timeline-1.0/compose$0.02output up to 300 s
Total per clip$0.04
200 clips$8.00400 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

All Media tools posts

Written by Sume