AI-901 · Domain 2: Implement AI solutions by using Microsoft Foundry · 58% of the exam
Task 2.3: Implement AI solutions with computer vision and image-generation capabilities by using Foundry
Sending images to a multimodal model, generating and editing images and video, and wiring vision into a small application.
Study it
Images in prompts: multimodal models
Lesson coming
Generating and editing images and video
Lesson coming
A lightweight vision application
Lesson coming
Sample questions
Try each one before opening the answer. Every option is explained, with the Microsoft documentation page that proves it.
Question 1 · choose 1
A travel brand wants a short clip with ambient sound that brings one of its watercolor beach illustrations to life, starting from that exact illustration. It plans to build the clip with models in Microsoft Foundry. Which approach fits?
ASend the illustration as a Sora 2 job's input reference, with a prompt that describes the motion
BSend a Sora 2 video job with a text-only prompt that describes the illustration in detail
CSend the illustration and a motion prompt to the image edit API of a gpt-image-2 deployment
DStream the illustration to a gpt-realtime deployment and request audio and video output
Show the answer and why
ASend the illustration as a Sora 2 job's input reference, with a prompt that describes the motion
Correct
Sora 2 supports image to video: a reference image anchors the first frame, the prompt describes what happens next, and the output can include generated audio.
BSend a Sora 2 video job with a text-only prompt that describes the illustration in detail
Incorrect
A text-only prompt creates an entirely new scene. The clip wouldn't start from the brand's own illustration, however detailed the description.
CSend the illustration and a motion prompt to the image edit API of a gpt-image-2 deployment
Incorrect
Image generation models create and edit still images. They don't produce video clips or sound.
DStream the illustration to a gpt-realtime deployment and request audio and video output
Incorrect
gpt-realtime is built for low-latency speech conversations. Foundry's other multimodal models don't generate video output; the Sora models do.
Sora 2 can start from a text prompt alone or from an image together with a text prompt. To animate an existing picture, pass it as the input reference so it anchors the first frame, and describe the motion in the prompt. Sora 2 can also generate audio for the clip. Image generation and speech models in Foundry don't produce video.
A team generated an 8-second clip with its video generation deployment in Foundry. Reviewers approve it but want the daytime sky changed to dusk, with the camera moves, subjects and scene layout kept as they are. Which approach fits?
AStart a new text-to-video job whose prompt describes the whole scene at dusk
BExtract the frames and edit each one with the image edit API and a sky mask
CRequest several variants of the original job and keep the one closest to dusk
DRemix the completed video by its ID with a prompt that describes only the sky change
Show the answer and why
AStart a new text-to-video job whose prompt describes the whole scene at dusk
Incorrect
A new job generates the clip again from scratch, so the camera moves, subjects and layout can come out differently.
BExtract the frames and edit each one with the image edit API and a sky mask
Incorrect
The image edit API works on still images one request at a time. It doesn't edit a video clip, and the video model offers a way to make targeted changes to a finished clip.
CRequest several variants of the original job and keep the one closest to dusk
Incorrect
Variants are alternative generations of the same prompt. Nothing asks for dusk, and each variant can differ from the approved clip in other ways too.
DRemix the completed video by its ID with a prompt that describes only the sky change
Correct
Remix reuses a completed video's structure, motion and framing and applies the requested change. Narrow, single edits keep the most fidelity to the source.
Sora 2 can remix an existing video: you reference the ID of a successfully completed generation and supply an updated prompt. The service keeps the original framework, scene transitions and layout while applying the change. Limiting the prompt to one clearly stated adjustment gives the most faithful result.
A furniture retailer wants to show a sofa in a different color in an existing product photo while leaving the rest of the room exactly as it is. They use a gpt-image series deployment. Which approach fits?
ACall the image edit API with a mask whose transparent pixels cover everything in the photo except the sofa
BCall the edit API with the photo, a PNG mask whose transparent pixels cover the sofa, and a prompt
CCall image generation with a new prompt that describes the whole room and the recolored sofa
DSend the photo to a vision-enabled chat model and ask it to recolor the sofa
Show the answer and why
ACall the image edit API with a mask whose transparent pixels cover everything in the photo except the sofa
Incorrect
Transparent pixels mark the area the model may change, so this mask would repaint the room and keep the original sofa.
BCall the edit API with the photo, a PNG mask whose transparent pixels cover the sofa, and a prompt
Correct
The mask's fully transparent pixels mark the area to edit, so only the sofa changes. The mask must be a PNG with the same dimensions as the photo.
CCall image generation with a new prompt that describes the whole room and the recolored sofa
Incorrect
Generating from scratch creates a new image, so the room won't match the original photo exactly.
DSend the photo to a vision-enabled chat model and ask it to recolor the sofa
Incorrect
Vision-enabled chat models analyze images and respond with text. They don't return an edited image.
For targeted edits (inpainting), the image edit API takes the original image, a prompt and an optional mask. Fully transparent pixels in the mask define the area to edit, which keeps the rest of the image unchanged.
A game studio's app generates concept art with an image generation deployment. Most prompts work, but prompts describing graphic battle injuries return an error and no image, while milder battle prompts succeed. What is the most likely cause?
AThe deployment used up its tokens-per-minute quota during those particular requests
BThe prompts didn't include a mask with the same dimensions as an input image
CContent moderation recognized those prompts as harmful, so no image was generated
DThe deployment's region doesn't offer the image generation model
Show the answer and why
AThe deployment used up its tokens-per-minute quota during those particular requests
Incorrect
Running out of quota causes throttling for requests regardless of their content, not only for one kind of prompt.
BThe prompts didn't include a mask with the same dimensions as an input image
Incorrect
A mask is only used when editing an existing image. Generating new concept art doesn't need one.
CContent moderation recognized those prompts as harmful, so no image was generated
Correct
Image generation includes input and output moderation. A prompt recognized as harmful, such as graphic violence, isn't turned into an image.
DThe deployment's region doesn't offer the image generation model
Incorrect
A region problem would make every request fail, not only prompts with certain content.
Image generation models come with built-in responsible AI protections: prompts and outputs are moderated, and harmful requests don't produce an image. Content-dependent failures point to moderation rather than quota or formatting.
A claims app sends car photos to a vision-enabled model and needs JSON with fixed fields, damaged_area and severity, that its code can parse after every call. Which approach makes the model follow that shape?
AUse structured outputs with a JSON Schema in the text.format setting
BAsk for JSON in the prompt and parse whatever the model returns
CAsk for the fields again in a follow-up message after the first reply
DSend the photos to an image generation model that outputs annotated images
Show the answer and why
AUse structured outputs with a JSON Schema in the text.format setting
Correct
Structured outputs make the model follow the JSON Schema you supply, and the Responses API supports it through text.format.
BAsk for JSON in the prompt and parse whatever the model returns
Incorrect
Instructions in a prompt influence the model but don't guarantee the shape of the reply, so parsing can still fail.
CAsk for the fields again in a follow-up message after the first reply
Incorrect
A second request is still free text, with nothing enforcing the shape.
DSend the photos to an image generation model that outputs annotated images
Incorrect
Image generation returns images, not the structured fields the claims system needs.
When code has to parse a model's answer, define the expected JSON Schema with structured outputs. Prompt instructions alone can't enforce the shape of the reply.
A team generates hundreds of draft thumbnail images a day for internal review. They want faster and cheaper generation and can accept lower visual fidelity. Which two changes help? (Choose TWO.)
ARequest ten images per call instead of one
BRequest a transparent background with PNG output
CSet the quality parameter to low
DUse a gpt-image-1-mini deployment
EAsk a vision-enabled chat model to draw the thumbnails
Show the answer and why
ARequest ten images per call instead of one
Incorrect
Asking for more images in each request adds generation time and cost to every call.
BRequest a transparent background with PNG output
Incorrect
A transparent background changes the image format and look. It doesn't make generation faster or cheaper.
CSet the quality parameter to low
Correct
Lower quality settings trade visual fidelity for speed; the docs describe low quality as optimized for latency-sensitive use.
DUse a gpt-image-1-mini deployment
Correct
gpt-image-1-mini is the lighter, more cost-efficient model, suited to prototyping, bulk generation and cost-sensitive use.
EAsk a vision-enabled chat model to draw the thumbnails
Incorrect
Vision-enabled chat models read images and answer in text. They don't generate images.
Image generation models and their quality settings trade fidelity for speed and cost. A low quality setting and a lighter model such as gpt-image-1-mini suit high-volume drafts.
A creative agency wants to try image generation models from providers other than OpenAI inside Microsoft Foundry. Which third-party family of image generation models does Foundry offer?
AFLUX, from Black Forest Labs
BWhisper, from OpenAI
Ctext-embedding-3-small, from OpenAI
DPhi, from Microsoft
Show the answer and why
AFLUX, from Black Forest Labs
Correct
FLUX is a family of image generation models from Black Forest Labs available in Foundry, known for photorealistic, flexible styles.
BWhisper, from OpenAI
Incorrect
Whisper is a speech to text model, not an image generator, and it's from OpenAI.
Ctext-embedding-3-small, from OpenAI
Incorrect
That's an embedding model that produces vectors, not images.
DPhi, from Microsoft
Incorrect
Phi models are small language models from Microsoft, not image generators.
Besides the gpt-image series, Foundry gives access to third-party image generation models such as FLUX from Black Forest Labs, designed for high-quality, photorealistic and stylistically flexible images.
A vision app lets users upload photos from professional cameras, and some files are 35 MB. What should the developer know about sending them to a vision-enabled chat model?
AThe size limit covers base64 data, so sending a URL avoids it
BThe service splits a large photo into tiles across several requests
CInput images are limited to 20 MB, so large files must be shrunk
DThe size limit is set per deployment and can be raised in the portal
Show the answer and why
AThe size limit covers base64 data, so sending a URL avoids it
Incorrect
The 20 MB maximum applies to input images whether they're sent as a URL or as base64-encoded data.
BThe service splits a large photo into tiles across several requests
Incorrect
Requests don't get split for you. An input image over the size limit has to be made smaller before it's sent.
CInput images are limited to 20 MB, so large files must be shrunk
Correct
The maximum size for input images is 20 MB, so the app should shrink larger photos before sending them.
DThe size limit is set per deployment and can be raised in the portal
Incorrect
The 20 MB maximum is an input limitation of vision-enabled chat models, not a deployment setting such as a rate limit.
Vision-enabled chat models restrict the size of input images to 20 MB, so apps that accept large uploads should resize or compress them first.
A Python app sends a request to a video generation deployment in Foundry to create an 8-second clip. The response arrives within a second and holds a video ID with the status "queued", but no video. What should the app do next?
AResend the request with a shorter duration so the clip fits in the response
BTreat the queued status as an error and retry the request with backoff
CDecode the video from base64 data in the job response's output field
DPoll the job status until it's completed, then download the video content
Show the answer and why
AResend the request with a shorter duration so the clip fits in the response
Incorrect
Video generation runs as an asynchronous job whatever the duration. The first response doesn't carry the finished video.
BTreat the queued status as an error and retry the request with backoff
Incorrect
Queued is the normal first state of a video job. Retrying only starts more jobs, and the number of jobs that can run at once is limited.
CDecode the video from base64 data in the job response's output field
Incorrect
The job response reports the job's ID and status. The finished MP4 is downloaded from the content endpoint after the job completes.
DPoll the job status until it's completed, then download the video content
Correct
Video generation is asynchronous: create a job, poll its status, and download the MP4 once the status shows the job completed.
Video generation is resource-intensive and runs as an asynchronous job, typically taking one to five minutes. The app creates the job, polls its status as it moves from queued through in progress to completed, and then downloads the finished video.
A print shop needs generated posters at 4K resolution in a custom aspect ratio. Which of these image generation models fits?
AGPT-Image-1-Mini
BGPT-Image-1.5
CGPT-Image-2
DA vision-enabled GPT-5 chat model
Show the answer and why
AGPT-Image-1-Mini
Incorrect
GPT-Image-1-Mini offers only a few fixed sizes, all well below 4K.
BGPT-Image-1.5
Incorrect
GPT-Image-1.5 offers a few fixed sizes that stop well short of 4K.
CGPT-Image-2
Correct
GPT-Image-2 is best for high-resolution and 4K generation, with arbitrary resolutions and broad aspect-ratio support.
DA vision-enabled GPT-5 chat model
Incorrect
Vision-enabled chat models analyze images; they don't generate posters.
Image generation models differ in sizes and strengths. GPT-Image-2 supports arbitrary resolutions up to 4K with broad aspect ratios, while the gpt-image-1 series uses a few fixed sizes.