[React-Native] Troubles sending images to Dall-E API

Hi everybody,

I’m currently building a simple mobile app in order to practice React-Native, which simply interact with Dall-E API.

I have some troubles generating variations, receiving error 415 from the API.

The image I want to use is converted to a base64 string, I’ve tried other encoding options, but nothing seems to work. I’ve used the same request format that I use for simple generations, which works fine.

If I’ve understood well, in python, the file is read as binary.

Does somebody knows more about how should the API receive the image, or faced the same kind of issues ?


As a react native developper, I would like to have the solution to that too, or a specific documentation. The react documentation specify that we should use:

const response = await openai.createImageVariation(
image_url = response.data.data[0].url;

Doesn’t seem to work with react native tho, if you ever find the solution notice us please!


I’m not familiar with React, but I remember a problem early on when the DALLE2 API launched… something about making sure the created PNG has the alpha channel… Sorry I can’t be more helpful.