Timeline compose stack ratio 0.4 on 1080x1920: 768 and 1,152 px
Timeline compose stack splits the 1080x1920 frame by ratio. Ratio 0.4 gives the still a 768 px band and the video the other 1,152 px. $0.02 flat per job.
On the default 1080x1920 output, layout.ratio: 0.4 in a horizontal stack gives the still the top 768 pixels (1920 x 0.4) and the video the remaining 1,152 pixels. Compose costs $0.02 flat per job.
Band heights by ratio
ratio is the share of the still, allowed from 0.1 to 0.9, and the video takes the exact remainder. Computed for a 1920-pixel-tall frame.
| ratio | Still band | Video band |
|---|---|---|
| 0.1 | 192 px | 1,728 px |
| 0.3 | 576 px | 1,344 px |
| 0.4 | 768 px | 1,152 px |
| 0.5 (default) | 960 px | 960 px |
| 0.9 | 1,728 px | 192 px |
Request
Required fields are operation (stack or overlay), image.url and video.url; both must already be on media.sume.com. The default horizontal split with image_region: top is the half-banner look. Output length always follows the video layer, up to 300 s. Mixing overlay keys into a stack returns compose_stack_takes_no_overlay_layout.
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-04-001" \
-d '{"operation":"stack","image":{"url":"https://media.sume.com/artifacts/artf_demo/banner.png"},"video":{"url":"https://media.sume.com/artifacts/artf_demo/talk.mp4"},"layout":{"split":"horizontal","image_region":"top","ratio":0.4}}'Fit modes
image_fit and video_fit take cover, contain or stretch; blur is not a compose fit. A 1080x768 band has a 1.41:1 aspect, so a square still with cover crops top and bottom.
Why flat price
The $0.02 rate is flat because video.duration may be absent until the worker probes the video. A mute video gives the warning compose_video_has_no_audio, not a failure. Next, put the MP4 into a Timeline 1.0 video[] slot.
Choosing a ratio
A product banner with a price line needs about a quarter of the frame, ratio 0.25, which is 480 pixels. A logo strip needs less, ratio 0.1 at 192 pixels. A 0.4 band at 768 pixels is room for a headline and a product shot. If you set a custom output size, the bands scale with its height, so 1280 pixels tall at ratio 0.4 is 512 and 768. Fifty shots cost 50 x $0.02 = $1.00. Every media job follows the same lifecycle: submit with an Idempotency-Key, receive a job, poll GET /v1/jobs/:id/status until it is ready, then read GET /v1/jobs/:id/result. A retry with the same key does not queue a second job, so a network error during submit never doubles a charge.
Sources
Related posts
More in Media tools
- Timeline refuses 9 chained fades: too_many_chained_transitions
Sume Timeline 1.0 refuses more than 8 adjacent fades with too_many_chained_transitions. How transitions are validated, and the hard-cut fix.
- Rendered video judders: output_fps_resamples_sources and 24 to 30 fps
Why a Sume timeline render can stutter when output.fps differs from your clips, what the output_fps_resamples_sources warning means, and the fix: omit fps.
- Timeline plan: 421 seconds of audio is 8 billable minutes, $0.80
How to price a Sume timeline render before you submit it: the free plan call, the ceil-to-minute rule, and why 421 seconds costs $0.80, not $0.70.
- Timeline render: 61 seconds bills 2 minutes ($0.20), 60 bills $0.10
Timeline 1.0 bills $0.10 per ceil(output minute), minimum one. A 60 s render is $0.10; 61 s rounds up to 2 minutes, $0.20. Use the free plan call to check.
Written by Sume