All methods to post images to "variations" endpoint end in error

I tried python, curl, and PHP to post to the images “variations” endpoint in order to receive an image back.

My images are less than 4MB and they are in PNG format. But I continue to get the same error with all the images I try.

Uploaded image must be a PNG and less than 4 MB.

Here’s an example of the Python code I was using

response = openai.Image.create_variation(
  image=open("resized_facebook.png", "rb"),
  n=1,
  size="1024x1024"
)
image_url = response['data'][0]['url']

Hey @ayrand1000,

did you find the reason of the error that you are getting?