Forum Discussion
Microsoft Foundry Agent via Responses API rejects local image input as Base64 data URL / byte array
This looks like a regression rather than an error in your payload. The current Microsoft Responses API documentation now shows the same input_image structure with a data:image/...;base64,... value, and the Foundry project Responses endpoint is documented as OpenAI-compatible. The related Microsoft Q&A thread also records that the GitHub issue was fixed a few days later.
I would first update the OpenAI and azure-ai-projects packages and retry against the current project endpoint: {project_endpoint}/openai/v1/responses, using a vision-capable deployment. Keep the MIME type aligned with the actual bytes, remove line breaks from the Base64 string, and send the complete data URL in image_url. A raw byte array still has to be converted into that supported request shape by the SDK.
If it still returns invalid_payload, compare the exact body using raw REST, capture the request ID, endpoint and package versions, and open an Azure support case. A short-lived Blob SAS URL remains a practical workaround.