GPT Image 2.5 mask_url edit: change one region, keep the rest
GPT Image 2.5 on Sume accepts a public mask_url alongside input_references. Build a mask with Pillow, host it, and edit only one region of a photo.

To change only part of an image, pass the photo in input_references and a second image as mask_url on openai/gpt-image-2.5. The Sume docs list mask_url as an optional public HTTPS mask URL for ChatGPT Image 2.5 edits (Image API docs), so treat it as a GPT Image 2.5 option and do not send it to other models. The prompt then describes what should appear in the masked area.
I could not confirm from Sume's docs which mask color marks the edit zone, so test with a small image first and flip the mask if the wrong region changes.
What does each piece do?
Read 2026-10-01.
| Field | Role |
|---|---|
input_references | The original photo, public HTTPS |
mask_url | Public HTTPS mask image; match the photo's size |
prompt | What should appear in the masked region |
quality | Higher quality costs more; fal lists $0.05268 high at 1024 square |
How do I build the mask?
Make a black image the size of your photo and fill the region you want changed with white. Save as PNG, upload it somewhere public, and use that URL.
from PIL import Image, ImageDraw
W, H = 1024, 1024
mask = Image.new("L", (W, H), 0)
draw = ImageDraw.Draw(mask)
draw.rectangle((300, 600, 724, 900), fill=255)
mask.save("mask.png")
print("mask.png", mask.size, "white box = region to change")How do I test it?
Generate with a low-cost setting first: set quality to low and look at which region changed. If it is the inverse, invert the mask with ImageOps.invert. Then raise quality for the final. Keep the prompt narrow ('replace the mug with a blue ceramic mug') and avoid asking for global changes, which fight the mask.
Good first edits to try
Start with objects that have clear edges: swap a mug, change a sign, remove a small item by asking for the surrounding surface to continue. Avoid faces and hands for the first test; they expose seams and anatomy errors that make it hard to judge whether the mask itself works.
Limits
The mask must be reachable by the API at a public HTTPS URL, so a local file path will not work. Edges of a hard rectangle can show a seam; blur the mask edge by a few pixels. The mask convention is not spelled out in what I read, which is why the test step matters. Prices on fal are a vendor reference only; Sume bills its own price in usage.cost.
Sources
Related posts
More in Models
- GPT Image 2.5 character drift: what OpenAI says and what to send
OpenAI's image guide says GPT Image may struggle to keep a recurring character the same across generations. What to send on Sume to reduce drift.
- Grok Imagine video in Sume: why it needs a start-frame image
Sume's Grok Imagine entry is image-to-video only: it blocks a submit without a start frame, tops out at 10 seconds, and sends no audio or aspect ratio.
- H3 Max 3D to Video: previs to photoreal on fal, not on Sume
fal's H3 Max 3D-to-Video turns a blockout render into photoreal video for $0.50 a request plus per second. Sume lists no such endpoint; what it offers instead.
- H3 Max Insert-Video: add a scene mid-clip on fal, and on Sume
fal's H3 Max Insert-Video adds 5 to 13 s to a source up to 60 s, billed on the new seconds only. Sume lists no such row; here is a trim, generate, join route.
Written by Sume