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.
- Image 1.0 input_urls, n and format: deprecated names to replace
Sume's Image 1.0 still accepts input_urls, n and format, but prefers image_urls, num_images and output_format. What each maps to and their limits.
- Image 1.0: text, reference or masked edit - which fields to send
Image 1.0 uses prompt only for text-to-image, prompt plus image_urls for edits or references, and adds mask_image_url for masked edits. Fields and URL rules.
- mask_image_url or mask_url? Masked edits on Sume's image APIs
Image 1.0 takes mask_image_url with image_urls; POST /v1/images takes mask_url with input_references for GPT Image 2.5. Field names, models and limits.
Written by Sume