Ideogram async generation_id polling vs Sume's 202 job envelope
Ideogram returns images directly unless async or webhook_url is set, then you poll /v2/generations. Sume blocks up to 30s, then returns a 202 job.

Ideogram's image endpoints wait and return data by default; set async or a webhook_url and you get a generation_id to poll at GET /v2/generations/{generation_id}. Sume's POST /v1/images blocks for up to 30 seconds and returns 200; if the work is still running, or you ask for mode: "async" or "webhook", it returns 202 with a job envelope.
Ideogram facts are from its Z-Image generate page; Sume facts are from Image models and Jobs and results, read 2026-10-01.
How do the two flows line up?
| Step | Ideogram | Sume images |
|---|---|---|
| Default | Waits, returns data | Blocks up to 30s, 200 with images |
| Go async | async: true or webhook_url | mode: "async" or mode: "webhook" |
| Handle returned | generation_id | job.id in a 202 envelope |
| Poll | GET /v2/generations/{generation_id} | GET /v1/jobs/{id}/status |
| Fetch output | Same polling endpoint | GET /v1/jobs/{id}/result |
How do I tell a Sume 200 from a 202?
Check the status code, not the body shape: 200 is the image response and 202 is the job envelope. The docs say slow configurations, such as 4K, high quality or large n, are the most likely to degrade to 202. So a handler that only expects data[].url will break on the slow ones.
const res = await fetch("https://api.sume.com/v1/images", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.SUME_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ model: "bytedance-seed/seedream-4.5", prompt: "a landscape photo", resolution: "4K" }),
});
const body = await res.json();
if (res.status === 202) console.log("poll", body.data.status_url);
else console.log("images", body.data);What if the job is not finished when I poll?
Keep polling the same job. The jobs docs say, for a non-terminal job: "Poll. Do not resubmit." Resubmitting creates a second generation, where polling reads the first. In webhook mode, wait for the callback and keep polling as a backup.
Which should I pick?
If you want one code path, send mode: "async" every time and always poll. If most calls are small, the default blocking call returns inline. For the callback side, see webhooks vs the API.
Sources
Related posts
More in Developers
- Ideogram API image URLs expire: download, or use Sume URLs
Ideogram's quickstart says image URLs expire, so download what you keep. Sume returns Sume-hosted signed URLs in data[].url. Where each result lives.
- Ideogram layerize API: text blocks vs Sume's flat image
Ideogram layerize returns positioned text blocks plus a text-free base. Sume's images API returns flat Sume-hosted signed URLs, with no layer output.
- Ideogram magic_prompt off and JSON prompts vs Sume passthrough
Ideogram 4.0 magic_prompt auto, on or off controls prompt rewriting. Sume has no passthrough parameters in v1, so that switch is rejected.
- Ideogram material swap API: 4 masks vs Sume's one mask_url
Ideogram's material-swap tool takes up to 4 masks and material images. Sume's images API has one optional mask_url plus up to 16 references.
Written by Sume