How can I provide a RGBA png file to OpenAI PHP library

your code probably is okay, you need to use transparent png (RGBA - (RGB - alpha)).
I struggled to find a tool that can provide a sample image.

Here you can use my sample images
openai/OpenAI.Playground/SampleData
or you can use this website https://www.online-image-editor.com/ to get your RGBA image.

Note: Original image also has to be RGBA, seems unnecessary but it has to be.

1 Like