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.

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.
| Item | Grok Image, 4 calls | Row with n up to 4, one call |
|---|---|---|
| Calls | 4 | 1 |
| Billed per image | About $0.025 | About $0.025 on Qwen Image |
| Total for 4 | About $0.10 | About $0.10 |
| Ratios listed | 13, incl. 9:20 | 13 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
- Group failed Sume jobs by error category with curl and jq
One curl and jq command that lists the last 100 failed jobs, groups them by error.category, code and retryable, and prints a sample job id for each group.
- Recast 400 "exactly one source video and 1-4 images": five causes
The Videos API refuses an h3-max-recast request that is not one video plus 1-4 images in input_references. Five causes of that 400 and what to send instead.
- Haiku 5.5 prompt caching for a Sume tool list: what breaks the cache
Haiku 5.5 cache hits cost $0.01 per million tokens. Keep the Sume tool list and effort setting stable so a long agent run keeps hitting the cache.
- Haiku 5.5 returns 400 for thinking disabled at xhigh: a Sume agent fix
Claude Haiku 5.5 rejects thinking disabled at xhigh or max effort. How that 400 shows up in an agent that calls Sume, and how to set the pair.
Written by Sume