Sume image edit returns 400: input_references on a text-only model

A Sume image edit fails with 400 when the model's input_references range is 0 to 0. Read the descriptor, pick a model that accepts references, and retry.

4 min readSume
All posts

An edit that sends input_references to a model whose catalog descriptor is {"min": 0, "max": 0} is rejected: the Image API docs say such models are text-to-image only and reject references. The fix is to read the descriptor and choose a model whose input_references max is above zero, or to drop the references and generate from text.

What the docs say

From the Image API docs.

Descriptor facts, read 2026-10-02
ItemBehaviour
Unlisted parameterRejected with 400 unsupported_parameter, not silently dropped.
input_references 0 to 0Text-to-image only; rejects references.
Reference URLsMust be public HTTPS; localhost, private and non-HTTPS URLs rejected before submission.

Find models that take references

List the catalog and keep those with a reference max above zero.

import os, requests

r = requests.get(
    "https://api.sume.com/v1/images/models",
    headers={"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"},
    timeout=30,
)
for m in r.json()["data"]:
    ref = m.get("supported_parameters", {}).get("input_references")
    if ref and ref.get("max", 0) > 0:
        print(m["id"], ref["max"])

Other causes of the same error

unsupported_parameter is a general result for anything the model does not list, so also check mask_url (documented for ChatGPT Image 2.5), background, quality values and seed, which no model serves in v1.

Prevent it

Run the descriptor check in CI against your saved request templates, so a model swap fails a test instead of a customer request.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume