GPT Image 2.5 mask edit: does the mask need an alpha channel?
OpenAI's API says the mask must contain an alpha channel. Sume's docs list a public HTTPS mask_url for GPT Image 2.5 edits but state no mask format rule.

For OpenAI's own API, yes: its guide says "The mask image must also contain an alpha channel" and that image and mask must match in format and size. Sume's docs list an optional public HTTPS mask_url for ChatGPT Image 2.5 edits but say nothing about alpha.
Sume's page does not state the alpha rule or any mask format rule, so whether Sume applies OpenAI's rule to mask_url is not documented. Preparing the mask to OpenAI's rule is a cautious choice, not a documented Sume requirement. Both pages were read 2026-09-30.
What does OpenAI require of the mask?
From OpenAI's image generation guide: the image and the mask must match in format and size (under 50MB), and the mask must contain an alpha channel. That rule is for OpenAI's API; this post does not claim Sume enforces it.
What does Sume accept?
On POST /v1/images, ChatGPT Image 2.5 (openai/gpt-image-2.5 and openai/gpt-image-2.5-sunburst) takes up to 16 image references, an optional mask_url, and background: auto|transparent|opaque. Reference and mask URLs must be public HTTPS; localhost, private-network and non-HTTPS URLs are rejected before submission.
| Item | Rule | Source |
|---|---|---|
| Mask alpha channel | Required by OpenAI's API; not stated in Sume docs | OpenAI |
| Image and mask | Same format and size (OpenAI's API) | OpenAI |
| Mask location on Sume | mask_url, public HTTPS | Sume |
| Reference images | Up to 16, public HTTPS | Sume |
What does the request look like?
Reference the source image in input_references and point mask_url at your mask (prepared to OpenAI's rule as a precaution).
curl -X POST https://api.sume.com/v1/images \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-image-2.5",
"prompt": "Replace the masked area with a ceramic mug, keep everything else",
"input_references": [
{ "type": "image_url",
"image_url": { "url": "https://media.sume.com/artifacts/artf_demo/photo.png" } }
],
"mask_url": "https://media.sume.com/artifacts/artf_demo/mask.png"
}'What can go wrong?
OpenAI's guide says the image and mask must match in format and size; Sume's docs say URLs must be public HTTPS and are rejected before submission otherwise. Slow edits can degrade to a 202 job envelope; read the result from GET /v1/jobs/{id}/result in that case. Failed generations are not billed.
How do I check this myself?
Test the mask on one low-cost call before a batch. If the edit ignores your mask, open it in an image tool and confirm the alpha channel exists and that its dimensions equal the source image, the two conditions OpenAI names for its own API. The linked docs pages and the catalog endpoint show the current values, and this post reflects them as of 2026-09-30.
Sources
Related posts
More in Developers
- GPT Image 2.5 moderation low: can you send it through Sume?
OpenAI lists a moderation parameter (auto or low) for GPT Image 2.5. Sume's request table does not list it, so check the catalog before sending it.
- Image 1.0 input_urls, n and format: deprecated names to replace
Sume's Image 1.0 still accepts input_urls, n and format, but prefers image_urls, num_images and output_format. What each maps to and their limits.
- Image 1.0: text, reference or masked edit - which fields to send
Image 1.0 uses prompt only for text-to-image, prompt plus image_urls for edits or references, and adds mask_image_url for masked edits. Fields and URL rules.
- mask_image_url or mask_url? Masked edits on Sume's image APIs
Image 1.0 takes mask_image_url with image_urls; POST /v1/images takes mask_url with input_references for GPT Image 2.5. Field names, models and limits.
Written by Sume