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.

4 min readSume
All posts

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?

Async behavior as written in the Ideogram and Sume docs, read 2026-10-01
StepIdeogramSume images
DefaultWaits, returns dataBlocks up to 30s, 200 with images
Go asyncasync: true or webhook_urlmode: "async" or mode: "webhook"
Handle returnedgeneration_idjob.id in a 202 envelope
PollGET /v2/generations/{generation_id}GET /v1/jobs/{id}/status
Fetch outputSame polling endpointGET /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

All Developers posts

Written by Sume