Grok Image n is 1 on Sume: four images mean four calls, $0.10

Sume's catalog caps n at 1 for Grok Image. A Python loop for four images costs $0.10, and runs sync. Ratios incl. 9:19.5 and 9:20 stay available.

3 min readSume
All posts

In the Sume catalog, x-ai/grok-image lists n as a range with a maximum of 1. Most other image rows allow up to 4. If you want four Grok images, send four requests. At about $0.025 each that is $0.10, the same total you would pay for n: 4 on a row that allowed it, because the docs say you pay cost_usd × n.

The repository catalog sets this cap on 2026-10-08. Read the n descriptor from GET /v1/images/models/x-ai/grok-image/endpoints first, since limits can change.

A four-call loop

This sync version waits for each request. If any reply is 202, the code stops and tells you to poll the job instead, so it never reads a missing field.

import os

import requests

URL = "https://api.sume.com/v1/images"
HEADERS = {"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"}


def grok_set(prompt, count=4, ratio="9:20"):
    urls = []
    for _ in range(count):
        resp = requests.post(
            URL,
            headers=HEADERS,
            json={"model": "x-ai/grok-image", "prompt": prompt, "aspect_ratio": ratio},
            timeout=60,
        )
        if resp.status_code != 200:
            raise RuntimeError(f"status {resp.status_code}: poll the job or read the error")
        urls.append(resp.json()["data"][0]["url"])
    return urls


print(grok_set("a quiet sunrise over a tall city skyline, soft film look"))

What you keep and what changes

  • The price per image is unchanged: about $0.025 each.
  • Ratios are unaffected. Grok lists 13, including 20:9, 19.5:9, 9:19.5 and 9:20, and it does not list 4:5.
  • Calls run one after another here; for speed, use mode: "async" and read each job result.
  • Each call returns its own hosted URL, so there is no batch object to unpack.
Grok Image four-call set versus an n:4 row (read 2026-10-08)
ItemGrok Image, 4 callsRow with n up to 4, one call
Calls41
Billed per imageAbout $0.025About $0.025 on Qwen Image
Total for 4About $0.10About $0.10
Ratios listed13, incl. 9:2013 on Qwen Image

When to pick a different row

If you need a batch of four from one call, use a row whose n range reaches 4, for example Qwen Image at the same $0.025 price. The ratio list matters too: if you need 4:5 for a feed post, Grok cannot serve it and Qwen Image can. For phone-tall art at 9:20, Grok is the row that lists it.

Failed generations are not billed, so a retry loop is safe on cost. Do not retry an invalid request unchanged, as it will fail the same way.

Using async mode instead

If four sequential calls feel slow, send them with mode: "async", collect the four job ids, and read each result when it is done. The jobs-and-results guide describes the envelope and the polling route. The billed total stays $0.10 for four Grok images; only the wall-clock time changes.

Pick one pattern per script. Mixing sync and async in the same loop makes errors harder to read, and a 202 in a sync loop is a stop sign, not a retry.

What Sume does not do

Sume does not split an n: 4 request into four calls for a row that caps n at 1, and it does not return a seed to reproduce a result. The cap is a catalog limit, not a rate limit; Sume answers an n above the cap with a 400.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume