Music API timeout at 30 seconds: poll or webhook instead

A song can outlast Sume's 30-second wait. The wait bounds the HTTP call, not the job, so submit async and poll the status URL, or use a webhook.

4 min readSume
All posts

A music job can outlast the 30-second wait, and that is expected. On Sume, wait_timeout_seconds is clamped to 0..30 and bounds how long the HTTP request blocks, not how long the job runs. Submit with async, then poll status_url, or pass a webhook_url.

Google's Lyria page lists Lyria 3.5 songs at "a couple of minutes". Sume's behavior is from Jobs and results, read 2026-09-30.

What happens when the wait runs out?

The response is still 2xx and still carries the job id. The envelope has status_url, result_url, events_url and cancel_url, plus a sync object whose timed_out is true when the wait returned early. You must continue with GET status_url, honoring next_poll_after_seconds when present, and must not submit a new paid job for the same intent.

Does mode subscribe give progress?

No. mode: "subscribe" is an alias of sync: the same 30-second wait, not an event stream. There is no SSE or WebSocket transport on the Developer API, and GET /v1/jobs/:id/events is a pull snapshot.

Which mode should a music job use?

Delivery modes per the Sume docs, read 2026-09-30.
ModeBehavior
sync / subscribeBounded wait, at most 30 s; may return a running job
asyncReturns at once with polling URLs
webhookReturns at once; callback on the terminal state

How do I fetch the audio?

Poll status until terminal, then read the result. The audio artifact is in result.artifacts[] where type is audio. The Music Router accepts metadata, mode, webhook_url and wait_timeout_seconds; for a callback receiver, see music webhook callback.

curl https://api.sume.com/v1/jobs/job_123/status \
  -H "Authorization: Bearer $SUME_API_KEY"

curl https://api.sume.com/v1/jobs/job_123/result \
  -H "Authorization: Bearer $SUME_API_KEY"

Sources

Related posts

More in Developers

All Developers posts

Written by Sume