Render a Short and wait for it in one request? Timeline sync mode
Timeline 1.0 can answer a Short render in one request when mode is sync and the job finishes within 30 seconds. Otherwise it returns 202 and you poll.

Yes, if the render finishes quickly. Pass mode: "sync" on a Timeline 1.0 render and Sume waits up to 30 seconds for a finished job and returns 200. If the render takes longer, you get 202 and poll the job instead. Write the client to accept both.
What the docs say
The default mode is async, which answers 202 with a job id straight away. Sync mode is a wait, not a promise. The Timeline 1.0 docs say you get 202 when the job is not done in time, so the same code path must handle both.
| Mode | Answer | What you do |
|---|---|---|
| async (default) | 202 with a job id | Poll or use a webhook |
| sync | 200 if finished in 30 s, otherwise 202 | Read the result, or poll if 202 |
A client that handles both
The script posts a render, reads the response, and polls GET /v1/jobs/{id}/status only when it did not get a 200. It uses an Idempotency-Key so a retry does not start a second paid render. The job id key name below follows the response shape in the docs; print the body once to confirm the field in your account.
import os, time, requests
API = "https://api.sume.com"
H = {"Authorization": "Bearer " + os.environ["SUME_API_KEY"],
"Idempotency-Key": "short-ep3-render-1"}
def render(body):
r = requests.post(API + "/v1/timeline-1.0/render",
json={**body, "mode": "sync"}, headers=H, timeout=60)
r.raise_for_status()
if r.status_code == 200:
return r.json()
job = r.json()
job_id = job.get("id") or job.get("request_id")
for _ in range(60):
s = requests.get(f"{API}/v1/jobs/{job_id}/status", headers=H, timeout=30)
s.raise_for_status()
if s.json().get("status") in ("completed", "failed"):
return requests.get(f"{API}/v1/jobs/{job_id}/result",
headers=H, timeout=30).json()
time.sleep(5)
raise TimeoutError(job_id)When to use it
Sync suits short, simple edits such as a title card plus one clip. Long chunked renders or many slots are more likely to pass 30 seconds. Do not resubmit with a new key because the first call returned 202; the job is already running and billed once.
Cost is the same
Billing does not depend on the mode. A Short of up to a minute costs $0.10 per ceil(output minute), and the free plan call shows the billable minutes beforehand.
Sources
Related posts
More in Formats
- Restyle your own footage with the Sume restyle Format
sume-restyle keeps the motion, timing and cuts of a clip you attach, rewrites its look chunk by chunk, and reassembles it with your original audio.
- Run 300 ad variants as three bulk queues on Sume
One Sume bulk queue holds 1 to 100 Format runs, so 300 variants means three queues with their own idempotency keys, caps and failure checks. The limits to plan.
- Season outline as nested input: one key, 64-key limit, 2 MiB
Put a whole season outline under one key of a Format run's input. Only top-level keys count toward 64, and the body can be up to 2 MiB, so 40 episodes fit.
- Shorts series sequential playback: fade out or hard cut each episode?
YouTube plays Shorts series episodes in order. Pick a hard cut or a short fade at the end of each one, with the Timeline 1.0 fade limits.
Written by Sume