Replicate Cancel-After header: 5 s to 24 h. Is there a Sume deadline?
Replicate's Cancel-After header sets a prediction deadline from 5 seconds to 24 hours. I found no deadline field in Sume's OpenAPI, so cancel it yourself.

Replicate lets you put a deadline on a prediction with a Cancel-After header: a value from 5 seconds to 24 hours, written as 30, 30s, 5m or 2h, and the prediction is canceled automatically if it has not finished. I found no equivalent field in Sume's OpenAPI document: the request fields I searched for, deadline and cancel_after, are not there, and wait_timeout_seconds only bounds how long the HTTP request blocks. On Sume the deadline lives in your client, which polls and calls cancel.
Replicate's header is from its Create a prediction page, read on 2026-10-02. Sume's behaviour is from Jobs and results, and the field search was run on the OpenAPI file shipped with Sume's docs.
What does Cancel-After do on Replicate?
It cancels the prediction itself when the duration passes. Valid values are 5 seconds to 24 hours, as an integer in seconds, or an integer followed by s, m or h. It is not the same as Prefer: wait, which only sets how long the HTTP request stays open.
The page's example sets a 2 minute deadline with Prefer: wait=10: the connection is held 10 seconds, and if the prediction is still running you receive an incomplete prediction object, which keeps running until it completes or reaches the 2 minute deadline.
What does Sume have instead?
wait_timeout_seconds is clamped to 0 to 30 and bounds the blocking HTTP wait only. A client-side timeout does not cancel the job: Sume's docs say it keeps running and still bills, and you have only stopped watching. There is a cancel call, POST /v1/jobs/{job_id}/cancel, but it succeeds only before generation starts; after that it returns 409 job_generation_already_started and the job runs to completion.
So a deadline on Sume protects you only in the queue. If a job is queued when your deadline passes, cancel it and the usage reserve is refunded; if it is processing, you cannot stop it, so your deadline should decide whether you still use the result, not whether the job runs.
How do the two compare?
The control moves from the server to your client.
| Item | Replicate | Sume |
|---|---|---|
| Server-side deadline | Cancel-After header, 5 seconds to 24 hours | No deadline field found in OpenAPI |
| HTTP hold | Prefer: wait, separate from the deadline | wait_timeout_seconds, 0 to 30 |
| After the deadline | Prediction canceled | Client decides; cancel works only before generation starts |
| Cancel once running | Covered by the deadline | 409 job_generation_already_started |
| Client timeout | Not stated on the page | Does not cancel; job keeps running and billing |
How do I enforce my own deadline on Sume?
Submit with mode: "async" and an Idempotency-Key. Poll status_url and honour next_poll_after_seconds. At your cutoff, read the status once more. If it is still queued, call cancel; if cancel returns 409, stop cancelling and decide whether to wait for the result. Never resubmit the same intent to get around a slow job, because that bills a second one.
Pick a cutoff by model: Sume's per-model limits for video come from GET /v1/videos/models, so read the catalog rather than assuming a duration.
Sources
Related posts
More in Comparisons
- Replicate predictions time out at 30 minutes: Sume's deadline
Replicate stops a prediction after 30 minutes unless support raises it. Sume documents no such field: the deadline is client-side and a timeout does not cancel.
- Replicate private models bill idle time: how Sume bills a job
On Replicate, a private model on dedicated hardware bills setup, idle and active time. Sume bills per job: a reserve at submit, then capture or refund.
- Replicate's six prediction statuses vs Sume's five job statuses
Replicate has starting, processing, succeeded, failed, canceled and aborted. Sume has queued, processing, completed, failed and canceled. The map and its gap.
- Resemble AI vs Sume: voice, detection and watermarking vs video
Resemble AI covers TTS, speech-to-speech, deepfake detection and watermarking. Sume makes media but ships no detection API. What each covers.
Written by Sume