Sume submit response: the sync object is null on async and webhook
In a Sume job envelope, data.sync is null for async and webhook modes. Check it for null before you read timed_out or capacity_exhausted.

In a Sume submit response, data.sync is null when the mode is async or webhook. It is filled in only for sync and subscribe, which wait up to 30 seconds. Code that reads data.sync.timed_out without a null check will crash on an async submit, so check for null first and poll status_url in every case where the job is not terminal.
What the fields mean
After a bounded wait, the envelope says whether the wait ended before a terminal state or was skipped.
| Field | Meaning |
|---|---|
wait_timeout_seconds | Wait budget you asked for, clamped to 0 to 30 |
timed_out | True when the response returned before a terminal state |
capacity_exhausted | True when the API skipped the wait because the waiter budget was full |
result_ready | True when result_url can return a result |
A null-safe branch
Either case is still a 2xx with a job id. Do not resubmit; poll.
def next_step(body: dict) -> str:
data = body["data"]
sync = data.get("sync") # None on async and webhook submits
if sync is None:
return "poll status_url"
if sync["timed_out"] or sync["capacity_exhausted"]:
return "poll status_url"
return "read data.job"
print(next_step({"data": {"sync": None}}))
print(next_step({"data": {"sync": {"timed_out": False, "capacity_exhausted": False}}}))Why 30 seconds is not a job duration
The wait budget bounds how long the HTTP request blocks. Video and avatar-video jobs usually outlast it, so a migrated code path that was a single blocking call needs a poll loop or a webhook behind it.
Sources
Related posts
More in Developers
- Sume TTS speed: generation_config 0.6-1.5, a slow/normal/fast enum too
Sume TTS has two speed inputs: a speed enum (slow, normal, fast) and generation_config.speed from 0.6 to 1.5. Volume runs 0.5 to 2. Use one, then listen.
- Sume TTS output_format: the mp3 44.1 kHz 128 kbps default and options
Send no output_format and Sume TTS returns mp3, 44,100 Hz, 128 kbps. Here is every allowed container, sample rate, bit rate and raw encoding.
- Sume TTS rate math: 38 millionths a character to $0.0475 per 1,000
How the TTS Router catalog's 38 micro-dollars per character, times Sume's 1.25 margin, becomes $0.0475 per 1,000 characters, and how to check it yourself.
- Preview Sume TTS sentence ids, lengths and job cost before you submit
A short Python script that splits a script like Sume's source API, groups sentences under 20,000 characters and prices each job at $0.0475 per 1,000 characters.
Written by Sume