GPT Image 2.5 transparent PNG: fix opaque backgrounds
Check whether your GPT Image 2.5 PNG has transparent pixels or a painted checkerboard. Verify output settings, original downloads and alpha before exporting.
For a transparent GPT Image 2.5 image, request background: "transparent" and output_format: "png" or "webp", then check the original file’s alpha values. A PNG extension, a gray checkerboard and the presence of an alpha channel each tell you less than whether the background pixels are actually transparent.
This guide is for developers and designers preparing product cutouts or reusable image assets. The settings follow the OpenAI image generation guide, checked September 9, 2026, for both Flare and Sunburst. The file checks below run locally; they are not a benchmark of either model’s cutout quality.
First distinguish a viewer grid from a painted grid
| Observation | Possible explanation | Next check |
|---|---|---|
| Checkerboard in the preview | Viewer transparency grid, or actual image pixels | Download the original and inspect alpha |
| PNG looks white in one application | White viewer background, or opaque white pixels | Place it over a dark background |
| RGBA file with alpha fixed at 255 | Alpha channel exists, but every pixel is opaque | Recheck generation and export settings |
| Some pixels have alpha below 255 | At least some transparency exists | Check whether it covers the intended background |
| Original is transparent, exported file is not | Export flattened or replaced the background | Review the editor’s export settings |
Do not use a screenshot as the test file. A screenshot usually captures the viewer’s rendered background along with the image. Save the generated image itself, and keep a copy before sending it through an editor or optimizer.
Request a format that can preserve alpha
For generation, the relevant arguments are:
result = client.images.generate(
model="gpt-image-2.5-flare",
prompt="A ceramic cup isolated on a transparent background, no text",
size="1024x1024",
background="transparent",
output_format="png",
)
This fragment assumes an initialized OpenAI client. The complete API guide includes setup, credentials and saving b64_json to a file. Calling the model is billable; checking an existing file is not.
For an existing product photo, use images.edit() and pass the reference image. Ask to remove the background while preserving the product’s shape, colors and label. Inspect those details afterward: preserving identity is an instruction, not a guarantee that the result is identical outside the background.
For transparency, both PNG and WebP are suitable formats. JPEG has no alpha channel. Renaming product.jpg to product.png does not convert the file or recover lost transparency. Also check whether the application wrapping the API actually exposes and forwards the background option.
Inspect alpha with a local script
Install Pillow in your Python environment with python -m pip install Pillow. Save the script as check_alpha.py:
import sys
from PIL import Image
with Image.open(sys.argv[1]) as source:
print("format:", source.format, "mode:", source.mode)
print("dimensions:", source.size)
alpha = source.convert("RGBA").getchannel("A")
histogram = alpha.histogram()
total = sum(histogram)
print("fully transparent pixels:", histogram[0])
print("partially transparent pixels:", sum(histogram[1:255]))
print("opaque pixels:", histogram[255])
print("non-opaque fraction:", round(1 - histogram[255] / total, 6))
Run it against the original download:
python check_alpha.py product.png
Converting to RGBA for inspection also handles palette-based transparency. If every pixel is opaque, conversion creates an opaque alpha channel; it does not remove the background. If only a few pixels are non-opaque, the image still may not be a useful cutout. Inspect where those pixels are located.
Check the edges, not just the background
Place the original over a dark fill and a light fill in an editor. Look for pale halos, missing handles, damaged label lettering and shadows that end abruptly. Inspect at the actual delivery size as well as zoomed in: resampling can change the appearance of a clean edge.
If the background is opaque, correct the format and background arguments first. If the background is transparent but the product has changed, refine the editing instruction or return to the original reference. Repeatedly editing the latest output can make it harder to identify where a detail was lost.
For files that must remain pixel-identical inside the product, use a workflow that explicitly preserves those source pixels and validate that requirement separately. Generative editing should not be described as lossless background removal.
Keep transparency through delivery
Export to an alpha-capable format with background flattening disabled. Open the exported file again and rerun the alpha check. If a downstream tool only accepts JPEG, agree on an intentional solid background; there is no transparent JPEG option to enable.
The size guide helps separate generation dimensions from final export dimensions. Use the model comparison when deciding which model to try, and the pricing guide before running repeated edits.
Frequently Asked Questions
- Does a PNG file always have a transparent background?
- No. PNG supports transparency, but a PNG can contain only opaque pixels. Inspect the original file's alpha values rather than relying on its extension or preview.
- Which GPT Image 2.5 settings request transparency?
- Use background: transparent with output_format: png or webp. JPEG cannot preserve alpha transparency. Then verify the returned file; requesting transparency is not the same as checking the result.
- Why does my image show a checkerboard?
- It can be a viewer's transparency grid or a checkerboard painted into the image. Inspect alpha and place the image over different solid backgrounds to distinguish them.


