Image burst after a model launch: 429 queue_full vs 503 retry plan
Launch week means batches. On Sume, 429 rate_limited, 429 queue_full and 503 provider_capacity_exceeded each need a different retry, plus idempotency keys.

When a new image model launches, you queue a few hundred prompts at once. Sume answers with different errors that need different retries: 429 rate_limited means back off using retry-after, 429 queue_full means wait for a running job to finish, and 503 provider_capacity_exceeded means retry later with the same idempotency key. Never re-submit a paid request under a new key.
The codes that matter
Sume's errors page lists these codes. The point of separating them is that two look alike (both are 429) but need opposite handling: a rate limit is about request frequency, and queue_full is about your workspace's capacity for generation jobs.
| Status and code | Meaning | Retry |
|---|---|---|
| 429 rate_limited | Too many requests in the window | Back off; honor retry-after if present |
| 429 queue_full | Concurrency and queue capacity are both full | Wait until a queued or processing job ends or is canceled |
| 503 provider_capacity_exceeded | Sume's provider dispatch queue is full | Retry later with the same idempotency key |
| 402 insufficient_credits | Balance too low for the generation | Top up; do not retry in a loop |
| 400 invalid_request | Bad body or parameter | Fix it; a retry will fail the same way |
One key per intent
The Jobs page says to retry a submit with the same Idempotency-Key so the retry returns the original job instead of billing a second one. Build the key from the prompt row, for example the SKU and the shot name, so a crash and restart reuses it. Use the key again only for the same operation and payload.
A retry loop
The loop below uses mode: "async" so each submit returns a job quickly. It retries only on 429 and 503 and gives up on anything else.
import os
import time
import requests
URL = "https://api.sume.com/v1/images"
HEAD = {"Authorization": "Bearer " + os.environ["SUME_API_KEY"]}
def submit(key, body):
headers = dict(HEAD, **{"Idempotency-Key": key})
delay = 2
for _ in range(6):
r = requests.post(URL, headers=headers, json=body, timeout=45)
if r.status_code in (200, 202):
return r.json()
if r.status_code not in (429, 503):
raise RuntimeError("status %s: %s" % (r.status_code, r.text[:200]))
wait = float(r.headers.get("retry-after", delay))
time.sleep(wait)
delay = min(delay * 2, 60)
raise RuntimeError("gave up on " + key)
def main():
body = {"model": "ideogram/ideogram-v4.5", "prompt": "launch banner", "mode": "async"}
print(submit("banner-sku-001-v1", body))
main()Keep the batch small enough
queue_full is a signal to submit fewer jobs at once, not to retry harder. Cap in-flight jobs on your side, poll the status URLs, and add the next prompt as a job finishes. The Generation admission page explains how queued state and concurrency interact.
What this does not cover
A failed generation is not billed, but a 402 is a balance problem, and retries will not fix it. I have not measured how long launch-week queues last, so the delays above are defaults you should tune.
Practical settings for a launch-week run:
- Cap in-flight jobs on your side.
- Log the request id from every error body.
- Alert on repeated
402, because retries will not clear it.
Sources
Related posts
More in Developers
- Sume /v1/images returns 200 or 202: branch on the status code
A slow 4K or xhigh image request on Sume returns 202 with a job envelope, not the image body. A Python client that handles 200, 202 and 502 correctly.
- image_size, aspect_ratio or size: which field wins on Sume
Sume's image API has three size fields. image_size beats aspect_ratio, size takes only a tier, and 4:5 is 1080x1350 portrait. Examples for GPT and Nano Banana.
- Image-to-video not starting on my photo: frame_images vs references
Your photo is a reference, not a first frame, when it goes in input_references. Use frame_images with first_frame on Sume /v1/videos to pin the opening shot.
- imagen-4.0-ultra-generate-001 ended Aug 17: the Sume images request
Google shut down three imagen-4.0 ids on Aug 17, 2026. A curl call to POST /v1/images that branches on 200 or 202, with an Idempotency-Key and a catalog check.
Written by Sume