Porting to Sume images: 400 unsupported_parameter checklist
Porting an image client to Sume: seed, stream, output_compression and size WxH return 400, and background works only on GPT Image 2.5. A fix for each.

When a ported image client gets 400 unsupported_parameter from Sume, the cause is almost always one of five fields: seed, stream, output_compression, a pixel size such as 1024x1024, or background sent to a model other than GPT Image 2.5. The Sume Image API rejects them with a 400 instead of dropping them silently, so remove or replace each one.
The five fields and their fixes
Sume's catalog only lists the parameters a model can actually accept, and the API refuses the rest. That protects you from a seed that was ignored while you believed the output was reproducible. stream is a separate case and returns 400 streaming_not_supported, because supports_streaming is false on every catalog row.
| Field | Result | Fix |
|---|---|---|
| seed | 400 unsupported_parameter | Remove it. Store the prompt and the output instead |
| stream | 400 streaming_not_supported | Remove it. Poll the job |
| output_compression | 400 unsupported_parameter | Remove it. Pick png or webp |
| size with WxH | 400 unsupported_parameter | Use image_size, or a size tier |
| background off GPT Image 2.5 | 400 unsupported_parameter | Use GPT Image 2.5, or edit the alpha afterwards |
Fix size first
size takes a resolution tier only. Put pixels in image_size, either as an enum or as {width, height}, and it outranks aspect_ratio. For GPT Image 2.5 custom sizes, both edges must be multiples of 16, the long edge at most 3840, the ratio at most 3 to 1 and the total between 655,360 and 8,294,400 pixels.
import os, requests
H = {"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"}
body = {
"model": "openai/gpt-image-2.5",
"prompt": "Flat teal banner with a white paper plane",
"image_size": {"width": 1920, "height": 640},
"quality": "medium",
"output_format": "webp",
}
r = requests.post("https://api.sume.com/v1/images", headers=H, json=body, timeout=60)
print(r.status_code, r.headers.get("content-type"))
print(r.text[:300])Read the error, then the catalog
A short pre-flight check against the catalog row saves a round trip for every request.
- The 400 body names the field, so fix the field it names.
GET /v1/images/modelsshows what each model accepts.- Do not retry a 400 unchanged. It is a validation error, not a transient one.
A port in four steps
Start from the request your old client sends and diff it against the catalog row for the Sume model. Delete seed, stream and output_compression. Move any WxH string from size to image_size. If you used background, check the model id is one of the two GPT Image 2.5 variants. Send one request at low quality to confirm the shape before you run a batch, since a validation error costs nothing but a failed job.
Two behaviors differ from some providers. Sume does not silently ignore a field it cannot honor, and Sume does not return a provider URL as the result: keep the Sume data[].url. If you need repeatable work, keep your prompt, model id and settings next to the saved output, since a seed is not available to replay a result.
Sources
Related posts
More in Developers
- GPT Image 2.5 cost calculator in Python: token grid, checked vs Sume
A short Python function reproduces Sume's GPT Image 2.5 prices from the token grid, $0.0074 at low and $0.2635 at max for 1024x1024. Table to check it.
- GPT Image 2.5 cached input works only on the Responses API
OpenAI's cached-input rates ($1.25-$2.00 per 1M) for GPT Image 2.5 apply only to Responses API images. Sume bills token rates with margin and no cache discount.
- GPT Image 2.5 references: OpenAI's page says 4, Sume accepts 16
OpenAI's image guide says up to four input images; Sume's docs allow 16 input_references on ChatGPT Image 2.5. The pages disagree, so test your count.
- GPT Image 2.5 output_compression returns 400 on Sume: use Pillow
OpenAI offers output_compression 0-100 for JPEG and WebP; Sume returns 400 unsupported_parameter for it. Request png, jpeg or webp, then compress with Pillow.
Written by Sume