Put a slide above an AI presenter with Timeline compose: $0.02 a shot

Stack a still slide on top and a talking avatar video below in one MP4 with Sume Timeline compose. The flat price is $0.02 per job. Request and layout inside.

5 min readSume
All posts

Use POST /v1/timeline-1.0/compose with operation 'stack': the slide goes on top and the avatar video below, in one MP4. The public rate is $0.02 flat per job, with no model inference, because it only runs ffmpeg on the worker.

What you need first

Compose takes one still and one video and returns one shot. Putting several shots in sequence is the job of Timeline 1.0.

  • A still (the slide) and a video (the avatar clip), both already on media.sume.com for your workspace. Import files first with POST /v1/media-imports.
  • An Idempotency-Key header, which is required.
  • The slide must probe as a still and the clip as video, or the job fails with compose_image_not_still or compose_video_not_video.

The request

The field that picks stack or overlay is operation. The default layout is a half-banner: slide on the top half, video on the bottom half. ratio is the slide's share of the frame, from 0.1 to 0.9, and the video gets the remainder.

import json, os, urllib.request

body = {
    "operation": "stack",
    "image": {"url": os.environ["SLIDE_URL"]},
    "video": {"url": os.environ["CLIP_URL"]},
    "layout": {"split": "horizontal", "image_region": "top", "ratio": 0.4},
    "output": {"width": 720, "height": 1280, "fps": 25},
    "mode": "sync",
}
req = urllib.request.Request(
    "https://api.sume.com/v1/timeline-1.0/compose",
    data=json.dumps(body).encode(),
    method="POST",
    headers={
        "Authorization": f"Bearer {os.environ['SUME_API_KEY']}",
        "Content-Type": "application/json",
        "Idempotency-Key": "slide-presenter-001",
    },
)
with urllib.request.urlopen(req, timeout=40) as r:
    print(r.status, r.read().decode()[:300])

Layout choices

With mode sync, Sume waits up to 30 seconds for a finished job and returns 200; otherwise you get 202 and poll the job. The output length comes from the video: the still stays on screen for the whole clip.

Stack layout keys (Sume docs, read 2026-10-05)
KeyAllowed valuesNote
splithorizontal or verticalHorizontal puts one region above the other
image_regiontop or bottom (horizontal); left or right (vertical)A wrong axis returns compose_image_region_wrong_axis
ratio0.1 to 0.9The slide's share; the video gets the rest
image_fit / video_fitcover, contain or stretchblur is not a compose fit

Cost of a slide deck

A 10-slide explainer, one avatar clip per slide, is 10 compose jobs at $0.02 each, so 10 x $0.02 = $0.20 on top of the avatar render. Ten 12-second clips at standard quality are 10 x 12 x $0.184 = $22.08 before any per-job rounding. The total is about $22.28.

What to do

Start with one slide, one 8-second clip and ratio 0.4. If the presenter's face is too small, move ratio down to 0.3 or switch to the overlay operation. Put the finished shots into a Timeline 1.0 video array to assemble the deck.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume