Which wait to use for a 30 second clip: sync, webhook or a poll
A table of the waits Sume documents for a 30 s clip: a bounded sync of up to 30 s, webhooks with retries, and a roughly 20 minute client deadline. Which fits.

For a 30 second video clip, use webhook mode or a poll with a deadline of about 20 minutes. Sync mode only holds the connection for up to 30 seconds, which is shorter than most video generations, and when it times out the job keeps running.
The numbers below are the documented waits, not measured generation times. Sume does not promise a completion time in the docs I read.
The documented waits
Each mode has a different clock.
| Mode | Documented wait | If it runs out |
|---|---|---|
| sync or subscribe | wait_timeout_seconds clamped to 0..30 | 2xx with the job id and sync.timed_out; poll, do not resubmit |
| webhook | Up to 10 attempts, 30 s apart, 10 s each | Delivery status exhausted; read the job |
| poll | Your deadline; docs suggest about 20 minutes for video | Job keeps running unless canceled |
Why sync mostly fits images
The /v1/images route defaults to sync with a 30 second wait and answers 200 on completion or 202 on timeout. A short image fits in that window. A video usually will not, so choose async or webhook for video and expect to poll.
A sensible combination
Submit with webhook_url and an Idempotency-Key, store the job id, and run a slow backstop poll that reads the job after a few minutes. If the webhook arrives, stop polling. If your own deadline passes, cancel only if the job has not started generating; otherwise it will complete and bill.
Handling the sync timeout is simple: it is a normal 2xx. Read the job id from it and move to polling.
The mode names can mislead. In the docs, sync and subscribe are the same bounded wait, and sending a webhook_url or callback_url without choosing a mode implies webhook. Async is the default when you choose nothing, and it returns right away with the job id for you to poll. Whichever you pick, store the job id the moment it comes back. For capacity, the submit response includes generation_limits, and a full queue answers 429 queue_full, which is safe to retry with the same Idempotency-Key after a pause.
Tradeoffs
Webhooks need a public HTTPS endpoint on the default port. Polling needs nothing inbound but costs reads. Sync is the simplest code and the least suited to long jobs.
Sources
Related posts
More in Developers
- Which workspace does a Sume MCP call spend from? Key or sign-in
The API key or the signed-in account selects the workspace; Sume tools never take a workspace id from the prompt. Confirm it with account_me before you spend.
- Word timestamps to video frame numbers at 29.97 fps in Python
Sume STT words[] carry start and end in seconds. Convert them to frame indexes with exact 30000/1001 math so cuts do not drift on long timelines.
- Workers OAuth Provider v1 or Sume's hosted MCP: which do I need?
Cloudflare's v1 OAuth library is for building your own MCP server. To call Sume tools from Claude or Cursor, connect Sume's hosted endpoint and skip the build.
- x-sume-webhook-timestamp is Unix seconds: the Date.now() mistake
Sume's x-sume-webhook-timestamp is Unix seconds. Comparing it to Date.now() in Node is off by 1000 and rejects every delivery. A short, tested fix.
Written by Sume