Hi @GenixPRO,
The issue you're encountering with GPT-4.5 not accepting Base64-encoded images via the data:
URL might be any recent change in the model's API behaviour. While this approach worked earlier, support for directly embedding Base64 images using data:image/...
URLs appears to have been deprecated or restricted in the latest API version (2024-12-01-preview
). This is why you're now seeing the "Invalid content type" error.
To resolve this, you'll need to upload the image to an external location such as Azure Blob Storage or any public image host and pass the publicly accessible HTTPS URL instead. If you're using Azure, you can generate a SAS URL for the uploaded image and use that in your request. We understand you prefer to continue using GPT-4.5 for its performance advantages, and this workaround will let you keep leveraging it until it retires.
Please look into: Vision-enabled chat model concepts.
I hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful, to help others find this solution as well.