Logo

azure-openai

#10481

value_not_supported_error

Invalid value provided. Supported values are: 'text', 'image_url', 'audio_url', and 'refusal'.

This error has been identified and solved.

Reason

The 400 status error in the Azure OpenAI API, with the specific message "Invalid value: 'image'. Supported values are: 'text', 'image_url', 'audio_url', and 'refusal'," is likely due to several possible reasons:

Incorrect Content Type

The error indicates that the value 'image' is not supported. This suggests that the type field in your request payload may be incorrectly set to 'image', which is not one of the accepted types ('text', 'image_url', 'audio_url', and 'refusal').

Model Limitations

The GPT-4o model, for example, only supports text input and does not support image URLs directly. If you are trying to use an image, you might be using the wrong model or configuration.

Request Payload Structure

The structure of your request payload might be incorrect, particularly in how the content is specified. The API expects specific formats for different types of content, and 'image' is not a valid type in this context.

Solution

To resolve the 400 status error in the Azure OpenAI API with the message "Invalid value: 'image'. Supported values are: 'text', 'image_url', 'audio_url', and 'refusal'," you need to adjust the content type and request payload accordingly.

  • Ensure the type field in your request payload is set to one of the supported values: 'text', 'image_url', 'audio_url', or 'refusal'.

  • Verify that you are using a model that supports the type of content you are providing.

  • Correct the request payload structure to match the expected format for the chosen content type.

By making these adjustments, you should be able to resolve the error and successfully submit your request.

Original Error Message

Raw

Invalid value provided. Supported values are: 'text', 'image_url', 'audio_url', and 'refusal'.

Original Error Message

Raw

Invalid value provided. Supported values are: 'text', 'image_url', 'audio_url', and 'refusal'.

© 2024 Portkey, Inc. All rights reserved

HIPAA

COMPLIANT

GDPR

Transform Your AI app prototypes to be production-ready

Talk to us →