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.

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.
| Item | Behaviour |
|---|---|
| Unlisted parameter | Rejected with 400 unsupported_parameter, not silently dropped. |
| input_references 0 to 0 | Text-to-image only; rejects references. |
| Reference URLs | Must 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
- Image reference URL rejected on Sume: localhost, http, private hosts
Sume's Image API rejects localhost, private-network and non-HTTPS reference URLs before submission. A pre-flight check in Python and what to host instead.
- Sume job response: status_url, result_url, events_url, cancel_url
A Sume submit returns four URLs: status_url to poll, result_url once result_ready is true, events_url for the timeline, cancel_url while cancelable is true.
- Sume job status: queue.state, a null position, worker_heartbeat
Why queue.position is null on a Sume job status, what queue.state and worker_heartbeat report, and what a poller should do when a job sits in the queue.
- Sume job usage_summary: reserved, captured, refunded, final
Read usage_summary on a Sume job: status reserved, captured or refunded, amounts in micros, the final flag, and why dollars are micros divided by 1,000,000.
Written by Sume