Basic vision API example fails

Hi,

can’t seem to get even the simplest vision api call to work. Normal text promptin works just fine.

for example this one from the docs:

from openai import OpenAI

client = OpenAI()

response = client.chat.completions.create(
  model="gpt-4o",
  messages=[
    {
      "role": "user",
      "content": [
        {"type": "text", "text": "What’s in this image?"},
        {
          "type": "image_url",
          "image_url": {
            "url": "link_from_docs",
          },
        },
      ],
    }
  ],
  max_tokens=300,
)

print(response.choices[0])

fails with:
openai.InternalServerError: Error code: 500 - {‘error’: {‘message’: ‘The server had an error processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if you keep seeing this error. (Please include the request ID req_42e5e57d2410034b3d04df2ffb7ee11c in your email.)’, ‘type’: ‘server_error’, ‘param’: None, ‘code’: None}}

Anyone else have similar problems? Fresh conda environment with python 3.12.3 and latest openai library installed using pip. Also tried with different images.

This error is an internal error on OpenAI’s server and not a problem with your environment.
It might work if you try again after some time.

If it still doesn’t work after some time, I recommend following the error message instructions and providing the request ID to the help center.