Grok Imagine: how many images per request, xAI vs Sume
xAI's image API takes n from 1 to 10 per request. Sume's catalog code gives Grok a maximum of 1, so send one image per call and loop for more.

On xAI's own API, Grok Imagine can return up to 10 images from one request, set with n. On Sume, the catalog code gives Grok (x-ai/grok-image) a maximum of 1 image, and the public n descriptor is built from that maximum, so plan on one image per call.
The xAI side comes from its image generation guide; the Sume side from the Image API docs and catalog code, read 2026-09-30.
How does xAI describe n?
The guide says you can generate multiple images in one request with n (1 to 10). On the REST API and OpenAI-compatible SDKs n is optional and defaults to 1. The xAI Python SDK is different: it uses sample() for one image and sample_batch(n=...) for more.
What does Sume publish for Grok?
Two code facts decide it. The router entry for grok-image is built with editCapable("grok-image", 1), a max_images of 1. The public side then builds n as rangeDescriptor(1, item.capabilities.max_images), so the range runs from 1 to 1.
The docs say up to 10 images per call with n, but per-model ceilings are lower.
| Where | Value for `n` |
|---|---|
| xAI REST API | 1 to 10, optional, default 1 |
| Sume docs, general ceiling | Up to 10, lower per model |
Sume catalog, x-ai/grok-image | Range 1 to 1 (max_images of 1) |
How do I get four Grok images on Sume?
Send four requests with the same prompt and collect the results. Each request is its own generation, so each gets its own result and its own billing outcome: completed generations are billed, failed or cancelled ones are not. Do not pass n: 4 and expect four back.
const prompt = "a red bicycle against a blue wall";
const calls = Array.from({ length: 4 }, () =>
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: "x-ai/grok-image", prompt }),
}).then((res) => res.json()),
);
const results = await Promise.all(calls);
console.log(results.length);Will the four images differ?
Separate generations from one prompt are separate draws, so expect variations. The Sume docs list seed as a schema field that no model advertises yet, so you cannot pin one. If you need a true batch from one call, choose a model whose n range is wider; see multiple images with `n`.
Sources
Related posts
More in Developers
- Grok Imagine video length: 1-15 s on xAI, 4-15 s on Sume
xAI allows 1 to 15 seconds for grok-imagine-video-1.5. Sume's catalog row allows 4 to 15, so a 2-second clip needs another id such as wan-3.0.
- HeyGen API key permissions: /v3/api_keys/self vs Sume /v1/me
HeyGen's GET /v3/api_keys/self shows a key's name, scopes and expiry. On Sume, GET /v1/me verifies the key and returns non-secret account metadata.
- HeyGen avatar voice id: default_voice_id vs Sume avatar_handle
HeyGen's PATCH /v3/avatars/{group_id} stores a default_voice_id. On Sume, TTS can take an avatar_handle and resolve that avatar's ready voice.
- HeyGen API idempotency key vs Sume: two different 409s
HeyGen returns 409 request_in_progress for an in-flight retry. Sume returns 409 idempotency_conflict only when a key is reused for a different payload.
Written by Sume