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.

5 min readSume
All posts

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.

Fields that return 400 on Sume images (read 2026-10-05)
FieldResultFix
seed400 unsupported_parameterRemove it. Store the prompt and the output instead
stream400 streaming_not_supportedRemove it. Poll the job
output_compression400 unsupported_parameterRemove it. Pick png or webp
size with WxH400 unsupported_parameterUse image_size, or a size tier
background off GPT Image 2.5400 unsupported_parameterUse 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/models shows 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

All Developers posts

Written by Sume