#Problem uploading base64 img to assistant with Vision

1 messages · Page 1 of 1 (latest)

merry grove
#

Hi, im trying to upload and image to an assistant in base64 but i got an invalid format error.
Code:

var message = await openai.beta.threads.messages.create(
            thread.id,
            {
                role: "user",
                content: [
                    {
                      "type": "image_url",
                      "image_url": {"url": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSU..."}
                    }
                ]
            }
        );
merry grove
idle junco
#

yes, for assistants its either external url or file id

merry grove
idle junco