Avatar video 429: rate_limited vs queue_full, and which retry to use
Both are HTTP 429 on avatar video submit. rate_limited uses retry-after; queue_full means no accepted capacity. A small Python helper to pick the wait.
Two different 429s
The Generation admission docs list two 429 codes. queue_full means the workspace has no remaining accepted generation capacity. rate_limited means request volume exceeded an abuse-protection limit.
| Code | Meaning | What the docs say to do |
|---|---|---|
| queue_full | No accepted capacity left | Wait for jobs to finish or cancel queued jobs, then retry with the same idempotency key |
| rate_limited | Too many requests | Use retry-after for backoff when present, with an idempotency key |
Capacity numbers
Plan concurrency and queue capacity from the docs: Free 1 and 5, Pro 4 and 20, Startup 8 and 40, Scale 20 and 100. A queued job counts toward capacity until it starts.
A helper that picks the wait
Run it as is; it needs no network.
def wait_seconds(status, code, headers, attempt):
if status != 429:
return None
if code == 'rate_limited' and 'retry-after' in headers:
return float(headers['retry-after'])
return min(60.0, 2.0 ** attempt)
print(wait_seconds(429, 'rate_limited', {'retry-after': '7'}, 1))
print(wait_seconds(429, 'queue_full', {}, 3))Rules
- Keep the same Idempotency-Key across retries so a successful earlier attempt is not billed twice.
- Under queue_full, retrying fast does not help; capacity opens when a running job finishes.
- Cancel works only before generation starts; after that the API returns 409 job_generation_already_started.
Sources
Related posts
More in Developers
- Preview regenerate too early: 409 avatar_video_preview_busy, no charge
Calling regenerate on an avatar video preview that is still queued or processing returns 409 avatar_video_preview_busy and refunds the reservation. What to do.
- product_image 400: must be a fetchable public image URL
Sume avatar video rejects a product_image or scene image that is not a direct public image. What the 400 says, and why share links and HTML pages fail.
- Avatar Video Scene Durations: Fields Must Agree and the 2.8 Rule
How Sume sets a text scene's length: ceil(words / 2.8), the 0.001-second agreement rule across duration fields, and worked examples of 14 and 15 words.
- Avatar voice not ready: 409 avatar_not_ready, voice_not_ready
A video request can fail with 409 avatar_not_ready because the avatar's voice is not ready. How this differs from a plain not-ready avatar, and the retry hint.
Written by Sume