Transparent backgrounds are now available in preview for GPT-Image-2 in the API

This didn’t need a meandering cookbook. One liner:

"background":"transparent" is no longer refused by the API with gpt-image-2.

Use my existing API AI image editor, where I did not gate the background values by model, to make a “generate” request.

Done:

Save to PNG, WebP, or GIF file format supporting the received transparency

I note an odd thin grey border, likely being a “color key” halo for the API backend method used to programmatically prompt and make transparent imagery. The RGB behind transparency actually contains a grey border larger than the alpha channel, and then more imagery beyond a border.

I would need to change the workflow to show more of the underlying “RGB leak” to you, as the image support library will flatten out pure macroblocks.