When I try to pass a .webp URL as an image input to the API, I get this error:
openai.BadRequestError: Error code: 400 - {'error': {'message': "You uploaded an unsupported image. Please make sure your image has of one the following formats: ['png', 'jpeg', 'gif', 'webp'].", 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_image_format'}}
The error message clearly says that webp is supported, but apparently it is not.
Here is the relevant part of the python code I’m using:
prompt = f"""
Your task is to extract information related to vehicles and their prices, given an image representing a vehicle promotion.
"""
request_content = [{"type": "text", "text": prompt}]
request_content.extend([{
"type": "image_url",
"image_url": {
"url": "<LINK THAT ENDS WITH .webp>"
}
}])
completion = client.beta.chat.completions.parse(
model="gpt-4o",
messages=[
{
"role": "user",
"content": request_content
}
],
response_format=CarList
)
Note that the forum doesn’t let me paste the actual link I’m using, but I can assure you it’s a valid .webp image URL that is available for public access.