Upload an image to OpenAI API

Answered

Hello everyone,

I'm working on integrating an image from my Xano database with OpenAI's API and encountering a challenge with the file upload process. The endpoint provided in the documentation (https://platform.openai.com/docs/api-reference/files) doesn't seem to accept direct file URLs. Based on my understanding, the usual approach is to first download the file locally and then upload it to OpenAI via the API, typically using Python. However, I'm aiming for a fully automated process that doesn't involve downloading the file on a user's device. My goal is to transfer the image directly from Xano to OpenAI, enabling interactions with OpenAI's new vision capabilities. Can anyone offer guidance or advice on how to achieve this?

2 replies