OpenAI Image Variations API Error

Hey Bubblers :wave:

If you’re familiar with OpenAI’s API suite, I’d appreciate your help!

I’m looking to create a product that uses OpenAI’s image variation service (documentation page here).

Everything in the API seems pretty straightforward, but I keep getting this error when I initialize my call. It doesn’t seem to recognise the image I’m passing through.

Here’s a screenshot of my API call. At this point in time, I’m just trying to test this without any dynamic parameters.

I reached out to our good friend ChatGPT and it suggested an alternative call with the image parameter structured like this:

Unfortunately, this still didn’t change the error message I’m getting.

If you’ve worked with this API call in the past, I’d appreciate any insights :pray:

You’re using Body Type JSON when it should be Form-Data as per OpenAI API docs stating required param is type FILE


Damiano is here to save the day :heart_eyes:

This fixed the issue. Genuinely appreciate your help!