How many images can I get per AI image request? Read n, don't guess
Sume's docs allow n up to 10 per call but say per-model ceilings are lower. Here is how to read each model's real n range from the catalog in one request.

It depends on the model, and the catalog tells you. Sume's Image API docs say n accepts 1 to 10 per call at the request level, then add that per-model ceilings are lower and that you should read the n range descriptor from the catalog. The Grok image row is capped at one image. Most other edit models you will use allow up to four.
Stay inside the row's range rather than testing its edge: read it once at start-up and clamp your own requests.
Read it from the catalog
The list endpoint returns each model with a supported_parameters object. Where a model supports several images, that object has an n entry of type range with min and max. A model without an n entry is not advertising multi-image output, so send one image per call and loop.
import os, requests
key = os.environ.get("SUME_API_KEY")
if not key:
raise SystemExit("set SUME_API_KEY")
r = requests.get(
"https://api.sume.com/v1/images/models",
headers={"Authorization": f"Bearer {key}"},
timeout=30,
)
r.raise_for_status()
for m in r.json()["data"]:
n = m.get("supported_parameters", {}).get("n")
print(f"{m['id']:45} {n if n else 'no n descriptor'}")What the docs fix and what they leave to the catalog
| Item | Value in Sume docs | Where to read the live number |
|---|---|---|
Request-level n | 1 to 10 | Request table in the Image API docs |
Per-model n ceiling | Lower than 10 | n range descriptor in GET /v1/images/models |
Grok image max_images | 1 | Catalog row for x-ai/grok-image |
| Text-only rows (Imagen 4, Recraft V4, Qwen Image Max, Soul) | No references accepted | input_references descriptor with max 0 |
Slow settings that degrade to a 202 | 4K, high quality, large n | Check the status code, not the body shape |
Why not just ask for ten
Large n is one of the settings the docs name as most likely to push a sync request past its 30-second wait and return a 202 job envelope instead of images. If you send n: 4 with high quality and 4K, plan for the envelope and poll the status_url.
Cost scales with images too. A completed generation is billed in full, so a batch you only half need is money you pay anyway. Ask for two, pick one, and ask again if neither works.
A note on other vendors
Do not assume another vendor's count carries over. Google's Gemini image docs (read 2026-10-06) describe their own reference-slot limits per model tier, and those are separate from anything on Sume's rows. The Sume catalog is the only source for what a Sume row accepts.
Sources
Related posts
More in Developers
- How Sume TTS splits a script into sentence ids (. ! ? only)
Sume's script source cuts sentences at periods, exclamation and question marks only, keeps every character, and numbers them sent_000000. Examples and traps.
- Huey task that polls an AI video job with schedule(delay=...)
A Huey task reads Sume's job status once and reschedules itself with task.schedule(delay=...) from next_poll_after_seconds, so no worker thread sleeps.
- Idempotency key for transcription: hash the request, avoid 409
Derive the Sume STT Idempotency-Key from a hash of audio_url, language and duration. A retry returns the same job. A changed body under that key is a 409.
- Ideogram 4.5 low to high on one order: new Idempotency-Key or a 409
A reused Idempotency-Key with a different payload returns 409 idempotency_conflict. Key on order id plus a payload hash so a quality change is a new job.
Written by Sume