OpenAI images.generate to Sume /v1/images: field by field map

Move a gpt-image-1 images.generate call to Sume POST /v1/images: which fields carry over, which return 400, and why size becomes image_size. Python mapper.

5 min readSume
All posts

Most images.generate fields carry over to POST /v1/images with the same name. Four do not: size becomes image_size, response_format and base64 output go away because Sume returns a hosted URL, and output_compression, moderation, partial_images and stream are not accepted. Sume returns 400 unsupported_parameter for a field the chosen model does not list, so a leftover argument fails loudly.

The table is built from OpenAI's image guide and Sume's image docs, both read on 2026-10-06.

Field map

OpenAI image API fields vs Sume, read 2026-10-06
OpenAI fieldOn SumeNote
modelmodelUse openai/gpt-image-2.5-sunburst, not a retired id
promptpromptSame
nnPer-model ceiling in the catalog; request cap is 10
size: 1536x1024image_size: {width, height}Sume's size field is a tier shorthand and rejects WxH
qualityqualityauto, low, medium, high; xhigh and max on ChatGPT Image 2.5
output_formatoutput_formatpng, jpeg, webp
output_compressionnot accepted400 unsupported_parameter
backgroundbackgroundauto, transparent, opaque; ChatGPT Image 2.5 only
moderation, partial_images, streamnot acceptedstream returns 400 streaming_not_supported
image / mask filesinput_references, mask_urlPublic HTTPS URLs, up to 16 references on 2.5
b64_jsondata[].urlSume returns a hosted URL

A mapper you can run

The function builds a Sume body from the kwargs of an old call and returns the fields it had to drop, so you can log them once and delete them from the caller.

def to_sume(oa):
    body = {"model": "openai/gpt-image-2.5-sunburst", "prompt": oa["prompt"]}
    for key in ("n", "quality", "output_format", "background"):
        if key in oa:
            body[key] = oa[key]
    size = oa.get("size", "auto")
    if size != "auto":
        width, height = (int(v) for v in size.split("x"))
        body["image_size"] = {"width": width, "height": height}
    gone = ("output_compression", "moderation", "partial_images", "stream",
            "response_format")
    return body, [k for k in gone if k in oa]

if __name__ == "__main__":
    old = {"prompt": "a red kettle", "size": "1536x1024", "quality": "high",
           "output_compression": 80, "moderation": "low"}
    print(to_sume(old))

Custom sizes on Sume

Custom GPT sizes must be multiples of 16, no edge above 3840, an aspect ratio of at most 3:1, and between 655,360 and 8,294,400 pixels. 1536x1024 passes all four. Read the full migration notes for the date and the id.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume