500 Error when generating image descriptions in production

Hi All,

We are currently implementing an image description based service using the python sdk chat completions, passing a system prompt and an image using a presigned s3 url. We have tested both gpt-4o and gpt-4-turbo but have received the same error.

    messages = [
        {
            "role": "system",
            "content": SYSTEM_PROMPT
        },
        {
            "role": "user",
            "content": [
                {
                    "type": "image_url",
                    "image_url": {
                        "url": file_location
                    }
                }
            ]
        }
    ]

    response = openai.chat.completions.create(
        model="gpt-4o",
        messages=messages,
        max_tokens=MAX_TOKENS,
        logprobs=True,
    )

Locally, this works fine with gpt-4o and 4-turbo, however as soon as we build and push the service to production (aws lambda), we are continuing to get the following error:

Error code: 500 - {'error': {'message': 'The server had an error while processing your request. Sorry about that!', 'type': 'server_error', 'param': None, 'code': None}}

We are stumped, as clearly the sdk works as we can get responses locally, and we are using the same API key.

Any suggestions on how to fix this issue would be great, thanks!

1 Like

Just replying to let you know that we’ve been receiving 500 errors consistently yesterday, as well as today.

There was an outage reported June 20th (yesterday), and it was reported to be resolved. https://status.openai.com/

But, still receiving the same errors for image recognition.

1 Like