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.

4 min readSume
All posts

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.

Image count per request, from the sources read 2026-09-30.
WhereValue for `n`
xAI REST API1 to 10, optional, default 1
Sume docs, general ceilingUp to 10, lower per model
Sume catalog, x-ai/grok-imageRange 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

All Developers posts

Written by Sume