n=10 on the Sume Image API: docs say 10, catalog says 4 (Grok 1)
The Image API docs say n goes up to 10, but every catalog model caps lower: 4 for most, 1 for Grok Image, 1 or 4 for Soul. The 400 you get and how to batch.

The Sume Image API documents n as 1 to 10 images per call, but no model in the catalog allows 10: the ceiling is 4 for most models, 1 for x-ai/grok-image, and exactly 1 or 4 for higgsfield/soul. A request that goes over the model's ceiling returns 400 invalid_request with the allowed range.
The docs say as much in one sentence: "Per-model ceilings are lower. Read the n range descriptor from the catalog." This post turns that sentence into a rule for code.
What the 400 looks like
If n is outside the model's range, Sume answers 400 invalid_request with a message of the form "n must be between 1 and 4 for the model", and details carries the field name with min and max. For Soul, a value of 2 or 3 is inside the 1 to 4 range but is rejected with details.allowed of [1, 4], because that model batches only one or four.
If a model had no n descriptor at all, the field would return 400 unsupported_parameter instead, which is a different failure.
| Model group | n allowed | Notes |
|---|---|---|
| GPT Image 2, 2.5 and 2.5 Sunburst | 1 to 4 | all three |
| Nano Banana 2.1 and Pro | 1 to 4 | both |
| Seedream 4, 4.5 and 5 Lite | 1 to 4 | all three |
| FLUX.2 Pro and Flex, Qwen Image and Max | 1 to 4 | four models |
| Imagen 4 Fast and Ultra, Recraft V4 | 1 to 4 | text-to-image only |
| Ideogram V3 and V4.5 | 1 to 4 | both |
| x-ai/grok-image | 1 | one image per call |
| higgsfield/soul | 1 or 4 | 2 and 3 are rejected |
Batching past the ceiling
To get ten images from a model whose ceiling is 4, send three requests: 4, 4 and 2. The price is linear, because Sume bills cost_usd times n: ten images on Qwen Image at 0.025 USD are 0.25 USD whether you send them as 4 + 4 + 2 or as ten calls of 1.
The chunking code is small and avoids the 400 completely if the ceiling comes from the catalog and not from a constant in your code.
def chunks(total, ceiling):
full, rest = divmod(total, ceiling)
return [ceiling] * full + ([rest] if rest else [])
print(chunks(10, 4)) # [4, 4, 2]
print(chunks(10, 1)) # ten calls of one image
print(chunks(8, 4)) # [4, 4]Why the two numbers differ
The n field in the request schema is shared by every image model, so the schema allows the widest range, 1 to 10. Each model then publishes its own descriptor, and the request check compares your value against that descriptor, not against the schema. The docs page describes the schema, and the catalog describes the models.
Practically: never hard-code 10, never hard-code 4. A client that stores the ceiling next to the model id keeps working when Sume adds a model that really does allow more, and fails loudly in your own tests, rather than at 3 a.m., when a model's ceiling is lower than you assumed.
Billing for a batch
Sume bills image generation all-or-nothing. A completed generation is charged in full from the endpoint pricing, and the charge is cost_usd times n. A failed or cancelled generation is not charged. For a three-slice batch of 4, 4 and 2 on a 0.025 USD model, the total is 10 x 0.025 = 0.25 USD, and if the last slice fails you pay for 8 images, 0.20 USD.
Read the ceiling at run time
GET /v1/images/models returns each model's supported_parameters, including n as a range descriptor with min and max. Read it once at start-up and cache it for the process. Each of the slices you send is a normal request, so each can return 200 or 202, as described in the Image API docs.
A Soul-specific rule is worth hard-coding next to the catalog read: if the model is higgsfield/soul, round the slice to 1 or 4, since the range descriptor alone does not tell you that 2 and 3 are refused.
Sources
Related posts
More in Developers
- Next.js Oct 14 security update: redeploy, then test your Sume webhook
Next.js will ship an out-of-band security update on Oct 14. Prepare your Sume webhook receiver now, then prove it still verifies after you redeploy.
- Node 26.11 --process-timeout exits 124: the Sume job keeps running
Node 26.11.0 adds --process-timeout, which kills a script with exit code 124. A Sume job it was waiting on keeps running and billing, so save the polling URL.
- Node script for a 9:16 TikTok video: check the model, then submit
A Node 20 fetch script that confirms a Sume model lists 9:16 and your duration, submits one 12-second 720p job, and saves an MP4 that fits TikTok's API limits.
- Test a Sume poll loop with node:test mock.timers, no real sleeping
Use node:test mock.timers to prove your poll loop waits next_poll_after_seconds, falls back to 2 s, and never polls early. A runnable test, no network.
Written by Sume