Fetching a dall-e 3 url and converting it into base64

Hi everyone,

I’m currently integrating the OpenAI DALL-E API into my project, but I’m encountering persistent CORS (Cross-Origin Resource Sharing) errors. It seems like my requests might be missing some necessary headers or there’s a configuration issue.

Does anyone have experience configuring CORS policies specifically for OpenAI APIs? I’m looking for advice on setting the correct headers and any server-side configurations that might be needed to properly handle these requests. Any insights or code snippets that could help clarify the correct setup would be greatly appreciated!

Thank you in advance!

Ps: my application runs on node.js and i’m using DALL-E version 3

Hi @guccidief

Welcome aboard. Quick googleing: CORS in Nodejs - Scaler Topics

Thank you, i will try to make something out of this. They really need to add more response formats though, I know they removed base 64 format for some reason.

The solution was to request the image from our backend and convert the url into base64 for anyone wondering, because or CORS you are not allowed to request the image on the browser side.

base64 is supported again