Re-render a Short's ending without double billing: Idempotency-Key
A Timeline render needs an Idempotency-Key. Reuse a key to retry the same request; use a new key when you change the ending.

Every POST /v1/timeline-1.0/render needs an Idempotency-Key. Reuse the same key to retry an identical request after a timeout, and the request is a replay, not a second render. Change the ending, and you must also change the key, because the same key with a different body is a conflict, not a new render.
The header requirement is from the Timeline 1.0 doc; how jobs are polled is in the jobs doc. A related stored post covers the 409 conflict on another endpoint.
A key scheme that works
Put what identifies the output into the key: the Short, the version, and a short hash of the body.
- Retry after a network error: send the same key and body.
- New ending for the same Short: new key, such as short-42-v2-ending-b.
- Different body, same key: expect an error; do not work around it by changing the body quietly.
Timeouts and sync mode
Default mode is async: you get a job and poll GET /v1/jobs/:id/status, then /result. A sync request waits up to 30 seconds. If a sync call times out, poll the job you were handed instead of submitting again; a second submit with a new key would be a second charge.
What does a retry cost?
An identical retry with the same key is the same job, so the render is billed once. A deliberate new version is a new job at $0.10 per ceil output minute.
| Action | Key | Result | Billing |
|---|---|---|---|
| Retry after timeout | Same key, same body | Same job | Once |
| Swap the ending | New key, new body | New job | $0.10 per ceil minute again |
| Edit body, keep key | Same key, new body | Conflict | None |
What Sume does not do
It does not choose keys. A key that never changes would make every later version collide.
Sources
Related posts
More in Developers
- Restate durable handler: submit a Sume job once, then poll safely
Restate stores completed steps and resumes after failure. Make the Sume submit one stored step, then poll the returned job id without a second charge.
- Retake one narration line: why reusing the key returns 409
Resubmitting a changed TTS script under the same Idempotency-Key returns 409 idempotency_conflict, and an identical retry returns the original job. Key naming.
- Reverse a video by API: FFmpeg reverse is not on Sume's allowlist
FFmpeg's reverse filter buffers a whole clip. Sume's video-filter allowlist has no reverse and no setpts, and the free check shows it. What to do instead.
- Sume run webhook 3xx redirect: a failed attempt, not a delivery
Sume does not follow redirects on run webhooks, so a trailing-slash 301 fails every attempt. How to find it with a no-follow probe and register the final URL.
Written by Sume