Having trouble getting transparent backgrounds in ChatGPT images

There was a point in time recently, when you could get the image with a transparent background on a platform like you recreated - that texting the image to yourself provided the transparent version without filling in the transparent bits with a solid checkerboard.

Bleatlock would know more about that.

I did get that method to work, it just ended up being quicker for me to use the solid green chroma background…

Looking forward to finding out if this is just a bug or something openAi is walking away from supporting?

:clinking_beer_mugs:

It is not a bug. OAI docs says that gpt-image-2 doesn’t currently support transparent backgrounds​:smirking_face:

My guess is that gpt-image-2 was optimized for other priorities first, higher realism, arbitrary resolutions, better generation/editing quality, maybe speed/architecture changes and transparent alpha output did not make it into this version. (This is just a guess based on docs)

Which was my understanding.

Transparent behavior might actually be classified as model misbehavior too…

Generally, not an area I want to associate with too deeply.

But these are just ideas, I have no way of knowing.

It’s not like anyone is out and said don’t seek it but, if it smells like encouraging misbehavior, I will error on the side of caution ^.^

Hmm, why do think that? I’m not sure I understand​:sweat_smile: Because transparent backgrounds are still supported by previous image models. I really think, like I mentioned above, that there might have been other priorities of capacities for this version​:woman_shrugging:

Personally, I think we should keep transparencies in house :-p

I’d be rather amused if this was actually working as intended.

This looks good :blush: and great prompt :+1:

Thank you!

There are other better prompts to get the transparent background​:sweat_smile:

Is this available for Videos / MP4 Segment?

If yes drop few samples.

Thanks in advance.

I don’t have video/MP4 samples to share. My testing here was only for still-image transparency.

For video, transparency depends on the codec/container workflow supporting an alpha channel, so I wouldn’t assume ordinary MP4 output has the same behavior.

Relevant docs/context that you can check:

https://developer.apple.com/documentation/avfoundation/using-hevc-video-with-alpha

https://developer.chrome.com/blog/alpha-transparency-in-chrome-video

Thankyou @LarisaHaster

I appreciate your message.

ChatGPT says:

All parameters with a question mark are optional - and you still get an image with an empty JSON as merely a trigger (and contents by the AI model observing the conversation).

Notable is that there are…

image

Leaving the AI to guess using pretraining up to cutoff or post-training on tool calling, and to hallucinate that referenced image IDs still does anything or that more than one image could be delivered from this old tool spec.

So we specify. Notably, ChatGPT gives us no promise of what “model” is used, or if today you fall back to a cheap “mini” image creator that does support transparency, or a “beta”. What we do know is that gpt-image-1.5 that is the last API model to offer transparency, and it is limited to three sizes. So we specify, like the earlier poster’s insight

Notable is that there is no “n:4” being satisfied, but instead the image model that also views the entirety of the chat interprets the language I sent (and not the internal tool JSON) as making a grid of four.

However, success: the images are indeed transparent without any “post-coding”. Here they are in my application where this mustard color rarely seen is the background behind transparency.

The delivered and seen whites are a value about 252 of 255, which aligns with prior suspicions of transparency being a held-out brilliant white, programmatically removed by OpenAI (and prior images being that sepia filter color).

Final product for the forum: a GIF:

Notable is the crudeness of the AI image…

The lazy person even uses AI to make their JSON...

I did a little easy test in ChatGPT and gen actually did surprised me a bit with the steps to transparent background. And this time fairly easy. At the beginning I prompted “fox cub trying to reach for a butterfly, orange background”, then the rest of the steps can be seen in screenshots​:backhand_index_pointing_down:

Usually when I’ve tested with opaque color and then edited to true alpha channel, it results in almost transparent background. But this time, chessboard and then with a simple prompt “remove the chessboard background” and the output was completely transparent.

Now, I know this seems like a child who had done the whole testing, but nevertheless, this was a bit interesting.

Add this paragraph when generating the image, it works for me all the time
“Make sure the image uses an alpha channel with a fully transparent background. No white, gray, checkerboard, or colored background. The final image should be a clean PNG-style logo with no background at all”

Welcome to the forum!

You’re welcome to post transparent background images here and thanks for sharing the prompt suggestion.

I actually tested your suggestion, but still got chessboard background. But maybe I missed something.

Also gpt-image-2 by default isn’t generating transparent background, so sometimes the prompts work and sometimes don’t.

I tried the same prompt as yours, and here’s the result. I’m not sure why it’s not working on your side, but one thing worth mentioning is that I’m using the “Extended” Thinking model, not the standard one.

I don’t think transparency can be prompted. Here is what I got:

What imageGen model are you using?

You may want to check if your image is really transparent: Check If PNG Is Transparent – Online PNG Maker

Actually with the right prompt, you can prompt for the transparent background. At least on ChatGPT.

As @_j showed above​:smirking_face:

Actually, according to Check If PNG Is Transparent – Online PNG Maker Your image is not transparent:

GhatGPT 5.5 Thinking, seemed to have generated a fake transparent background for me. Tho using my phone, it shows as transparent. I have by default white screen and when I press the image it changes to black background and the image seems to have transparent background.

Like this: GIF​:backhand_index_pointing_down:

GIF_0127856486