Transparent AI image: PNG or WebP, not JPEG, on GPT Image 2.5

For a transparent AI image, request png or webp with background transparent on GPT Image 2.5. JPEG has no alpha. Code to request and verify the alpha channel.

5 min readSume
All posts

For a transparent AI image on Sume, use GPT Image 2.5 with background: "transparent" and an output_format of png or webp. JPEG has no alpha channel, so it cannot hold transparency. The OpenAI guide makes the same point, and Sume only exposes background on the two GPT Image 2.5 variants.

Which format for which job

PNG is lossless and the safe choice for logos, stickers and anything you will edit again. WebP also supports alpha and gives smaller files for web pages. Use JPEG only for an opaque photo where file size matters more than edge quality. If a sticker will be edited and saved again, keep it as PNG, because each JPEG save adds loss.

Prompt for flat subjects with no cast shadow and no backdrop words. A soft shadow becomes semi-transparent pixels and looks like a gray halo on a dark page.

Output formats for transparent images (read 2026-10-05)
FormatAlphaBest for
pngYesLogos, stickers, edit chains
webpYesWeb pages, smaller files
jpegNoOpaque photos only
svgNo GPT 2.5 optionIn the vocabulary but no v1 model advertises it

Request and verify

Never assume the file is transparent. Download it and read the alpha channel.

import os, requests
H = {"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"}

def generate(body):
    r = requests.post("https://api.sume.com/v1/images", headers=H, json=body, timeout=60)
    if r.status_code != 200:  # 202 = still running, read data.status_url
        raise SystemExit(f"{r.status_code}: {r.text[:300]}")
    return r.json()["data"][0]["url"]
from io import BytesIO
from PIL import Image

url = generate({
    "model": "openai/gpt-image-2.5",
    "prompt": "A flat sticker of a smiling paper plane, no shadow",
    "background": "transparent",
    "output_format": "png",
    "image_size": "1024x1024",
})
im = Image.open(BytesIO(requests.get(url, timeout=60).content))
alpha = im.convert("RGBA").getchannel("A").getextrema()
print(im.format, "alpha range", alpha)
print("transparent" if alpha[0] < 255 else "opaque")

Price

GPT Image 2.5 is billed on tokens. The fal pages list $30 per million output image tokens, $8 per million image input tokens and $5 per million text input tokens. Sume bills the provider list price times 1.25. The table is output-only, so reference and prompt tokens add a little on top of it.

Output-only price at 1024x1024 by quality (read 2026-10-05)
QualityProvider listSume at list x 1.25
medium$0.0132$0.0165
high$0.0527$0.0658

If the alpha is missing

These three checks cover the usual causes of an opaque file.

  • Check that the format is png or webp.
  • Remove scene words such as "on a table" from the prompt.
  • Confirm the model is a GPT Image 2.5 variant, since other models answer 400 unsupported_parameter for background.

If the call returns 202

POST /v1/images waits up to 30 seconds and returns 200 with the images. A slow job falls back to a 202 job envelope, and you read the images from GET /v1/jobs/{id}/result. The code above exits on any non-200 so you notice, and a failed synchronous job returns 502 and is not billed.

Use on a page

On a web page, serve the WebP version to browsers and keep the PNG as the master. Test the image on a light and a dark section before launch. Check the edges at 200 percent zoom: a thin light fringe means the cut-out was drawn against a white scene, and a fresh generation with a flatter prompt usually fixes it.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume