QuestionQ24

Implement AI solutions by using Microsoft Foundry

You have a Microsoft Foundry project that includes a vision-enabled chat model deployment.

You are developing a Python application that sends a request with a user prompt and a local JPEG image.

You need to include the image as binary data in the request. What should the image_url.ur1 field be set to?

  • A data:image/jpeg;base64,<binary_image_data>
  • B file:///C:/images/photo.jpg
  • C C:\images\photo.jpg
  • D https://<your-storage-account>.blob.core.windows.net/<container>/<file>.jpg
Explanation

A local JPEG must be encoded as Base64 and supplied as a data URL using the data:image/jpeg;base64, prefix. This embeds the image data directly in the request payload; local file paths are not service-accessible URLs.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!