API Call not viewing images i upload / from url

I am creating a wordpress plugin for myself, that will look at an image and create tags based upon what the image is of. If i do this using the web version of chatgpt4o , i get a great description of the image. I am trying to use images i have uploaded in wordpress media, but i have also tried url links.

However by using api , ive used gpt-4 , gpt-4-turbo amongst others, and i get this response

“I’m sorry, but I can’t directly access or retrieve images from URLs. However, if you describe the image to me or upload it in another way that’s accessible, I’d be happy to help you describe or analyze it!”

How can i get the API to work in the same way the website does?

How are you adding the image?

https://platform.openai.com/docs/guides/vision

This might also help…

1 Like

Definitely +1 to this as well, I am unable to use the API for Chat Completions to successful pass in the image_url, not sure if i’m doing anything wrong too, but I have been debugging for quite sometime, could anyone help take a look?

{
“content” :
{
“type” : “text”,
“text” : “Open this image. What is in this image?”
},
{
“type” : “image_url”,
“image_url” : {
“detail” : “high”,
“url” : “”
}
},
“role” : “user”
}

content is array

{
“content” : [
    {
       “type” : “text”,
      “text” : “Open this image. What is in this image?”
   },
   {
      “type” : “image_url”,
     “image_url” : {
            “detail” : “high”,
           “url” : “”
         }
    }
],
“role” : “user”
}

Reference

1 Like