Which Sume timeout is which: sync, jobs_wait, waitForJob, webhooks

Sume's waits differ: 30 s sync cap, 50 s jobs_wait, a 20-minute SDK default in ms, 10 s per webhook attempt. A table of each unit and what expiry does.

4 min readSume
All posts

Sume has no single timeout. The sync wait is capped at 30 seconds, the remote MCP jobs_wait tool waits 50 seconds by default, the TypeScript waitForJob helper gives up after 20 minutes, and a webhook attempt must answer within 10 seconds. None of these cancels the job when it expires, so a timeout is a reason to poll again, not to resubmit.

The table below puts every wait side by side with its unit, because the mixed units (seconds in the API, milliseconds in the SDK) cause most of the confusion.

Every wait in one table

Values come from the Sume jobs, webhooks and SDK run docs, plus the SDK source, read 2026-10-10.

Sume waits and what happens at expiry, docs and SDK source read 2026-10-10
WaitDefaultUnitWhat expiry does
Sync or subscribe response (wait_timeout_seconds)Capped at 30secondsThe response returns with the job still running; poll by id
Remote MCP jobs_wait50, cap 55secondsReturns wait_slice_expired; call it again with the same ids
waitForJob timeout (TypeScript SDK)20 minutes (1,200,000)millisecondsThrows SumeJobTimeoutError; the job keeps running
waitForJob pollInterval2,000millisecondsA floor: the server hint can raise the gap, never shorten it
waitForRun (Formats runs)10 minutesmillisecondsThrows; the run keeps going
subscribeFormatRun20 minutesmillisecondsStops the subscription; the run keeps going
Webhook attempt10 per attemptsecondsCounts as a failed attempt; 10 attempts, 30 s apart

The two traps

The first is units. wait_timeout_seconds takes seconds; timeout: 600 in waitForJob is 600 milliseconds, not ten minutes. Write 10 * 60_000 so the unit is visible in the code. The second is that the MCP tool and the REST parameter differ: the API accepts a larger wait value and clamps it, while the MCP tool is capped at 55 seconds. Do not assume that a longer number buys a longer wait.

  • Use sync mode only for work that normally finishes inside 30 seconds; for video, submit with mode: "async".
  • Treat any wait expiring as "not finished yet": read GET /v1/jobs/{id} and look at status and next_poll_after_seconds.
  • Never cancel a job just because your own timer fired; a canceled job is a separate call.

Choosing the right wait

A browser-facing request has a few seconds of patience, so submit async and return the id. A worker can use waitForJob with a ten-minute budget and let the server hint pace its polls. A fire-and-forget pipeline should use a webhook and stop polling at all, with a polling sweep as the backstop for a missed delivery.

One more consequence: because expiry never cancels, a script that times out and resubmits the same prompt can end up paying twice. Reuse the original job id, or resubmit with the same Idempotency-Key.

Worst case for a webhook

A webhook that never answers has a bounded cost. Each attempt can use up to 10 seconds, there are 10 attempts, and the docs give a 30-second spacing between them. Ten attempts of 10 seconds plus nine gaps of 30 seconds is 370 seconds, or a little over six minutes, before delivery is marked exhausted.

Your fallback poll should therefore start after that window, not before. A sweep that lists active jobs every few minutes catches any completion your endpoint missed without hammering the read budget.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume