Implement Computer Vision Solutions · Topic 1 of 2

Image and Video Generation

AI-103 media generation: images from text and reference media, inpainting and mask edits, Sora 2 video jobs, parameters such as seconds and size, remixing.

  • 4 min
In a nutshell
  • Image generation: text to image, reference images, mask-based inpainting, prompt-driven edits.
  • Video generation is an asynchronous job: submit, poll, download.
  • Sora 2: seconds 4, 8 or 12; size 1280x720 or 720x1280; input_reference; remix_video_id.

What it is

Foundry offers image generation models that create pictures from text prompts and reference images, and video generation models such as Sora 2 that create short clips from text and reference media. AI-103 tests how to call them, how to edit their output, and which controls shape the result.

Promptplus optional referenceGeneration requestsize, length, countJob runsMedia returnedEditmask or remix

How it works

Image generation

TaskHow it works
Text to imageSend a prompt describing the subject, style and composition
Image from reference mediaSupply one or more input images to guide style or content
Inpainting (mask-based edit)Supply the image and a mask, a PNG the same size as the image; the fully transparent area of the mask marks where the model may change the image
Prompt-driven modificationDescribe the change to make to an existing image

Typical controls include the output size, quality level, the number of images and the output format. Prompts work best when they are specific about subject, setting, style, lighting and what to avoid.

Video generation with Sora 2

Video generation is an asynchronous job: you submit a request, poll the job status, then download the result.

PropertyMeaning
promptText describing the clip
secondsClip length; Sora 2 accepts 4, 8 or 12
sizeResolution as a single value: 1280x720 (landscape) or 720x1280 (portrait, the default)
input_referenceA single reference image used as the anchor for the first frame; it must match the requested size exactly
remix_video_idStarts from an existing generated video to edit it with a new prompt

The earlier Sora preview used different parameter names (such as width, height, n_seconds and n_variants). Questions on AI-103 follow the current API.

A worked example: a studio wants an 8-second landscape clip that starts from an approved product shot. The request sets the prompt, seconds to 8, size to 1280x720 and input_reference to the product image at exactly 1280x720, then polls the job until it completes.

Editing generated video

  • Remix an existing video by referencing it and describing the change, for example a different time of day.
  • Limit each remix to one clearly described change; narrow edits keep more of the original video.
  • To compare alternative takes, submit separate generation jobs and choose the best one.

Choosing generation and editing controls

RequirementControl
Keep a brand character consistentSupply reference images
Change only part of an imageInpainting with a mask
Portrait clip for mobilesize 720x1280
Several image options to choose fromNumber of images (n)
Change an existing clipRemix from its video ID
Exam tip

In a mask edit, the masked (transparent) region is what changes. Everything outside it is kept.

How the exam asks about this

  • "Replace only the sky in a product photo." Inpainting with a mask over the sky.
  • "A clip must start from an approved product image." Set input_reference to that image, at the same size as the video.
  • "Change the lighting of a clip already generated." Remix it using its video ID.

What to remember for the exam

  • Image generation: text to image, reference images, mask-based inpainting, prompt-driven edits.
  • Video generation is an asynchronous job: submit, poll, download.
  • Sora 2: seconds 4, 8 or 12; size 1280x720 or 720x1280; input_reference; remix_video_id.
  • Old preview names (width, height, n_seconds, n_variants) are not the current API.
  • Choose controls that match the requirement: masks for partial edits, references for consistency.
Watch out

Video generation does not return the clip in the first response. The app must poll the job and fetch the output when it is ready.

Common mistakes

Using separate width and height for Sora 2. Use a single size value.

Asking for a 10-second Sora 2 clip. Allowed lengths are 4, 8 or 12 seconds.

Regenerating a whole image to change one region. Use a mask edit.

Check yourself

  • Which Sora 2 property anchors the first frame to an image you supply?

    input_reference, an image that must match the requested size.

  • What does the mask do in an image edit?

    Its transparent area marks the region the model may change; the rest is kept.

  • How do you change an existing generated video?

    Remix it by referencing its video ID with a new prompt.

Topic 1 of 2 in Implement Computer Vision Solutions

Test yourself on Implement Computer Vision Solutions

The full Microsoft AI-103 question bank has 648 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Microsoft. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.