Skill 2.3.3
Build a lightweight application that includes vision capabilities
Key Concepts
A typical Python vision client uses the Foundry SDK: it creates an AIProjectClient with DefaultAzureCredential, gets an OpenAI client, reads an image file and encodes it as base64, and calls responses.create() with a user message containing the text instruction and the image. The application prints the description, answer or extracted values; with structured outputs it can return fields such as product name, colour and condition for code to store.
The same application can add image generation by calling the images API on an image-model deployment and saving the decoded bytes as a PNG file. Azure Vision in Foundry Tools offers prebuilt image analysis (captions, tags, object detection and OCR) when a fixed, predictable output is preferred to a prompt, and Azure Content Understanding extracts consistent schema-based fields from images at scale.