Implement AI solutions with computer vision and image-generation capabilities by using Foundry
Unlock the complete study guide + 1,040 practice questions across 16 full exams.
Bundled into the existing Microsoft Azure AI Fundamentals premium course — no separate purchase.
14-day money-back guarantee — no questions asked.
Included in this chapter:
- Three request shapes, one deployment each
- Deploy a vision-enabled model and test it
- Get the image into the prompt
- Options that tune a vision request
- Generate a new image from a prompt
- Edit an existing image with a mask
- Exam patterns for vision and image generation
Three visual request shapes and what changes between them
| Decision point | Image in, text out | Text in, image out | Image in, image out |
|---|---|---|---|
| Model you deploy | Vision-enabled (multimodal) model, for example gpt-4.1 or Phi-4-multimodal-instruct | Image-generation model, for example the gpt-image-1 series or FLUX | An image model that supports the edit operation |
| What the request carries | A text instruction plus an image, as a URL or a base64 data URL | A prompt describing the subject and visual style | A source image, a prompt, and optionally a mask |
| What comes back | Words: a description, an answer, or wording read from the picture | New image data in the b64_json field | A modified version of the source image |
| Python client call | client.responses.create() or client.chat.completions.create() | client.images.generate() | The images edit operation |
| Options that matter | detail on the image item, and max_tokens or max_completion_tokens | n, size, quality, output_format | mask, alongside the generation options |
| How it fails visibly | finish_reason of length, meaning the answer was truncated | Forgetting to base64-decode b64_json before saving the file | Omitting the source image, which turns the job back into plain generation |
Decision tree
Cheat sheet
Unlock with Premium — includes all practice exams and the complete study guide.
Also tested in
References
- Develop a vision-based chat app (Microsoft Learn training unit)
- Use a vision-capable model in the Microsoft Foundry portal (Microsoft Learn training unit)
- What are image-generation models? (Microsoft Learn training unit)
- How to use image generation models in Microsoft Foundry
- How to use vision-enabled chat models in Microsoft Foundry
- Foundry Models sold by Azure: image generation models
- Explore image-generation models in Microsoft Foundry portal (Microsoft Learn training unit)
- Create a client application that uses an image generation model (Microsoft Learn training unit)
- Azure Content Understanding analyzer reference
- What is Azure Content Understanding in Foundry Tools?
- Migrate from Azure Vision in Foundry Tools - Image Analysis