Logo

azure-openai

#4310000

input_format_error

Invalid image data: the provided image data is not correctly formatted in base64.

This error has been identified and solved.

Reason

The 400 status error in the Azure OpenAI API, specifically related to uploading an image, is likely due to one of the following reasons:

  • Incorrect Image Format: The image is not in one of the supported formats, which are PNG, JPEG, WEBP, and non-animated GIF.

  • Exceeding Size Limit: The image size exceeds the 20 MB limit imposed by the Azure OpenAI service.

These issues result in the server being unable to process the request, leading to a "Bad Request" error with a status code of 400.

Solution

To resolve the 400 status error when uploading an image to the Azure OpenAI API, ensure the following:

  • Verify that the image is in one of the supported formats: PNG, JPEG, WEBP, or non-animated GIF.

  • Ensure the image size is below the 20 MB limit.

If these conditions are not met, adjust the image accordingly to comply with these requirements.

Original Error Message

Raw

Invalid image data: the provided image data is not correctly formatted in base64.

Original Error Message

Raw

Invalid image data: the provided image data is not correctly formatted in base64.

Suggested Links

https://learn.microsoft.com/en-us/answers/questions/1690324/azure-openai-assistants-cant-upload-file-with-visi https://learn.microsoft.com/en-us/answers/questions/1333283/add-your-data-file-formats-in-chat-playground https://community.openai.com/t/400-errors-on-gpt-vision-api-since-today/534538 https://learn.microsoft.com/en-us/answers/questions/1866419/azure-openai-file-api-not-working https://community.openai.com/t/using-images-to-discuss-with-an-assistant/761024

© 2024 Portkey, Inc. All rights reserved

HIPAA

COMPLIANT

GDPR

Transform Your AI app prototypes to be production-ready

Talk to us →