Skip to content

AI-103 · Domain 3: Implement computer vision solutions · 13% of the exam

Task 3.1: Design and implement image- and video-generation solutions

Generating images and videos from prompts and reference media, inpainting and mask-based edits, editing generated video, and the generation controls each model offers.

Study it

  • Image generation and editing: prompts, reference images and masks

    Lesson coming

  • Video generation and editing

    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 site edits stock photos with a GPT-image model: only the sky should be replaced with a sunset, and every other pixel must stay as it is. You send the photo, a prompt and a mask to the image edit API. How must the mask be prepared?

  1. AA PNG at half resolution, fully transparent over the sky
  2. BA JPEG the same size as the photo, painted white over the sky
  3. CA PNG the same size as the photo, transparent everywhere except the sky
  4. DA PNG the same size as the photo, fully transparent over the sky
Show the answer and why
  • AA PNG at half resolution, fully transparent over the sky

    Incorrect

    The mask must have the same dimensions as the input image.

  • BA JPEG the same size as the photo, painted white over the sky

    Incorrect

    Masks are PNG files, and the editable area is defined by transparency, not by a white fill.

  • CA PNG the same size as the photo, transparent everywhere except the sky

    Incorrect

    That inverts the mask: transparent areas are the ones the model edits, so it would repaint everything but the sky.

  • DA PNG the same size as the photo, fully transparent over the sky

    Correct

    The mask marks the area to edit with fully transparent pixels (alpha of zero), must be a PNG and must match the input image's dimensions.

For inpainting, the mask tells the model where it may change pixels: fully transparent areas are edited, opaque areas are kept. Use a PNG with the exact dimensions of the source image.

Question 2 · choose 1

A retailer wants short landscape clips in which its own product photo comes to life, starting exactly from that photo. The team uses Sora 2 in Microsoft Foundry. How should they make each request?

  1. APass the photo as input_reference, sized to match the 1280x720 output
  2. BDescribe the product in a text-only prompt at the highest resolution
  3. CGenerate ten frames with an image model and stitch them into a clip
  4. DSet seconds to 12 so that the photo stays on screen for longer
Show the answer and why
  • APass the photo as input_reference, sized to match the 1280x720 output

    Correct

    input_reference is a single image used as the anchor for the first frame, and it must match the output size exactly.

  • BDescribe the product in a text-only prompt at the highest resolution

    Incorrect

    A text-only prompt creates a new scene; it can't start from the exact photo.

  • CGenerate ten frames with an image model and stitch them into a clip

    Incorrect

    Separately generated stills don't give the motion and temporal consistency that video generation provides.

  • DSet seconds to 12 so that the photo stays on screen for longer

    Incorrect

    Clip duration doesn't make the video start from the product photo.

Sora 2 can start from a text prompt alone or from a reference image. To animate a still, send it as the input reference at the output's exact resolution together with a prompt that describes the motion.

Question 3 · choose 1

Users of a design tool wait for an image to appear and often click Generate again because nothing happens for many seconds. The product team wants users to see the image take shape while it's being generated. Which control should you use?

  1. AThe n parameter set to 4 so that several images return together
  2. BA larger size value for every generation request
  3. CThe quality parameter set to high for every generation request
  4. DStreaming, with partial_images set to return intermediate images
Show the answer and why
  • AThe n parameter set to 4 so that several images return together

    Incorrect

    n sets how many final images come back; users still see nothing until generation completes.

  • BA larger size value for every generation request

    Incorrect

    A larger image takes longer and still shows nothing until generation completes.

  • CThe quality parameter set to high for every generation request

    Incorrect

    Quality changes the fidelity of the final image; users still see nothing until it is done.

  • DStreaming, with partial_images set to return intermediate images

    Correct

    With stream enabled, partial_images (1 to 3) returns intermediate images before the final one, which improves perceived latency.

Streaming with partial_images is the control for progress users can see; the other parameters change the final image, not when users first see it.

Question 4 · choose 1

A packaging designer wants four different takes on the same product illustration from one prompt, returned together so the team can pick one. How should the image generation request be set?

  1. ASet quality to high so more options appear
  2. BSet size to 1536x1024 in the request
  3. CSend four requests with identical settings in a row
  4. DSet n to 4 in a single generation request
Show the answer and why
  • ASet quality to high so more options appear

    Incorrect

    Quality changes fidelity, not the number of images.

  • BSet size to 1536x1024 in the request

    Incorrect

    Size sets the dimensions of each image, not how many come back.

  • CSend four requests with identical settings in a row

    Incorrect

    That works but takes four calls instead of one.

  • DSet n to 4 in a single generation request

    Correct

    The n parameter returns between one and ten images in one call.

Use n when you want several variants of the same prompt back from one call.

Question 5 · choose 1

A social media team asks Sora 2 for clips and keeps getting 4-second videos, but it needs 12-second ones. Which request parameter should it set?

  1. Aprompt, with the phrase "12 seconds long" added to it
  2. Bsize, set to a larger output resolution
  3. Cseconds, set to 12 in the create request
  4. Dmodel, set explicitly to the Sora 2 deployment name
Show the answer and why
  • Aprompt, with the phrase "12 seconds long" added to it

    Incorrect

    Duration is set by the seconds parameter, not by prompt text.

  • Bsize, set to a larger output resolution

    Incorrect

    Size sets the resolution, not the duration.

  • Cseconds, set to 12 in the create request

    Correct

    Sora 2 accepts 4, 8 or 12 seconds, with 4 as the default.

  • Dmodel, set explicitly to the Sora 2 deployment name

    Incorrect

    Naming the model doesn't change the clip's duration.

Duration is a request parameter for Sora 2, not something to ask for in the prompt. Check the supported values before sending a request.

Question 6 · choose 1

A team's Sora 2 prompt "a coffee shop" produces clips that vary widely in framing and movement. What does the guidance recommend for the prompt?

  1. ADescribe shot, subject, action, setting, light and camera motion
  2. BKeep the prompt to a single word so that the model has more freedom
  3. CList ten unrelated scenes in one prompt to get more variety
  4. DAdd the word "realistic" several times for emphasis in the prompt
Show the answer and why
  • ADescribe shot, subject, action, setting, light and camera motion

    Correct

    The prompt guidance asks for those elements to reduce ambiguity, and to keep each prompt single-purpose.

  • BKeep the prompt to a single word so that the model has more freedom

    Incorrect

    A vaguer prompt increases variation.

  • CList ten unrelated scenes in one prompt to get more variety

    Incorrect

    Multi-purpose prompts hurt adherence.

  • DAdd the word "realistic" several times for emphasis in the prompt

    Incorrect

    Repetition doesn't specify framing or motion.

Write video prompts like a shot list: what's in frame, what happens, where, in what light and how the camera moves, one shot per prompt.

Question 7 · choose 1

A web team wants gpt-image-2 banners at a custom size instead of the preset ones. Which requested size satisfies the documented constraints?

  1. A4096x1024 pixels
  2. B2400x800 pixels
  3. C2401x800 pixels
  4. D3200x800 pixels
Show the answer and why
  • A4096x1024 pixels

    Incorrect

    The long edge exceeds 3,840 pixels.

  • B2400x800 pixels

    Correct

    Both edges are multiples of 16, the long edge is under 3,840 pixels, the ratio is 3:1 and the pixel count is in range.

  • C2401x800 pixels

    Incorrect

    2401 isn't a multiple of 16.

  • D3200x800 pixels

    Incorrect

    The aspect ratio is 4:1, above the 3:1 maximum.

gpt-image-2 supports arbitrary resolutions within limits: edges in multiples of 16, a long edge up to 3,840 pixels, an aspect ratio up to 3:1 and a bounded total pixel count.

Question 8 · choose 1

A team assumed it would need a separate tool to add sound to its Sora 2 clips of city streets. What does the Sora 2 overview say about audio?

  1. ASora 2 supports audio generation in its output videos
  2. BAudio is added only when seconds is set to 12
  3. CSora 2 outputs silent video only, with no audio track
  4. DAudio is produced only for image-to-video requests
Show the answer and why
  • ASora 2 supports audio generation in its output videos

    Correct

    The capabilities list says Sora 2 supports audio generation in output videos.

  • BAudio is added only when seconds is set to 12

    Incorrect

    Duration doesn't control whether audio is generated.

  • CSora 2 outputs silent video only, with no audio track

    Incorrect

    Audio generation is listed as a capability.

  • DAudio is produced only for image-to-video requests

    Incorrect

    The docs don't limit audio to one input mode.

Read a model's listed capabilities before adding extra tools to a pipeline; for Sora 2 the list includes audio in its output videos.

Practise domain 3 →Practise all domains →