Audio detach in sync mode: 30 seconds, then a 202 you poll

Audio detach defaults to async. With mode sync it waits up to 30 seconds for a 200, or returns 202 to poll. Why a timeout is not a failure and how to retry.

4 min readSume
All posts

Audio detach on Sume runs async by default; pass mode: "sync" and it waits up to 30 seconds for a finished 200 job, or returns 202 so you can poll. The audio detach docs, read 2026-10-03, say exactly that, and the jobs docs add the rule that matters: a sync wait that ends before the job is terminal is not a failure, so poll and do not submit a new paid job.

What does each mode return?

Every mode returns the job id in its first response, so you can always recover the job.

Modes from the Sume jobs docs, read 2026-10-03
ModeFirst responseWhat you do next
async (default)202 with the job envelopePoll status_url, then read result_url
syncEnvelope after up to 30 sTerminal: read it. Not terminal: poll
webhook202, callback storedVerify the signature; keep polling as a backup

How do I tell a timed-out wait from a failed job?

On a sync response, sync.timed_out is true when the wait returned before a terminal state, and sync.capacity_exhausted is true when Sume skipped the wait because its waiter budget was full. In both cases the response is still 2xx and carries the job id. Continue with GET status_url, honoring next_poll_after_seconds when present.

When is a retry safe?

  • Retrying the submit is safe if you reuse the same Idempotency-Key; the retry returns the original job instead of billing again.
  • Submitting a new job for the same intent is not safe, because detach is $0.01 per job and the first one is still running.
  • Detach is ffmpeg work, usually quick, but the docs set no time target, so treat 30 seconds as a ceiling on waiting, not a promise.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume