mask_url returns 400 on Nano Banana 2 and Ideogram 4.5: your options

Only ChatGPT Image 2.5 accepts mask_url on Sume; other models answer 400 unsupported_parameter. Three ways to still change one region of a photo.

4 min readSume
All posts

Region editing is the headline of two launches. FLUX 3 Image's docs describe edits by boxes on a 0 to 1000 grid, and Midjourney's V8.2 edit model can inpaint and outpaint in its editor (Black Forest Labs docs, Midjourney updates feed, both read 2026-10-04). If you carry a mask workflow over to the Sume API, the first thing you will hit is a 400.

Why you get 400

The Image API docs list mask_url as an edit mask URL that only ChatGPT Image 2.5 (both variants) supports. The catalog is the parameter allowlist: if the selected model does not list a parameter, Sume rejects it with 400 unsupported_parameter and does not silently drop it. That is deliberate, so a mask never goes unapplied without you knowing.

mask_url support on Sume, from docs.sume.com/models/images, read 2026-10-04
Modelmask_urlEdit path without a mask
openai/gpt-image-2.5, -sunburstAcceptedMask plus references
google/nano-banana-2400 unsupported_parameterReferences and a prompt
ideogram/ideogram-v4.5400 unsupported_parameterFirst reference is the image to edit
black-forest-labs/flux.2-pro400 unsupported_parameterReferences and a prompt

Three ways forward

The third option is the only one that guarantees unchanged pixels, because your code does the copy. The other two rely on the model.

  • Use ChatGPT Image 2.5 with mask_url. The mask is guidance, so verify the result.
  • Keep the model and describe the region in words: "change only the mug on the left third; keep everything else identical".
  • Edit, then composite the changed region back over the original in your own code, so pixels outside your box come from the source.

A request that is allowed

Send the source in input_references and the mask in mask_url, both as public HTTPS URLs, and keep the mask the same size as the source.

import os
import requests

body = {
    "model": "openai/gpt-image-2.5",
    "prompt": "Replace only the masked area with a ceramic mug. Keep everything else identical.",
    "input_references": [{"type": "image_url", "image_url": {"url": "https://example.com/desk.png"}}],
    "mask_url": "https://example.com/desk-mask.png",
}
r = requests.post(
    "https://api.sume.com/v1/images",
    headers={"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"},
    json=body,
    timeout=60,
)
print(r.status_code, r.text[:300])

Sources

Related posts

More in Models

All Models posts

Written by Sume