Understanding Image and Video Generation Models
This lesson explains how image-generation models create new images from text descriptions and edit existing images, and how video-generation models apply similar techniques to produce short clips.
Learning outcomes
After completing this lesson, you will be able to:
- Explain how diffusion models generate images.
- Distinguish text-to-image generation, image editing and inpainting.
- Describe how video generation differs from image generation.
- Identify the measures for responsible use of generated media, such as content credentials.
How image generation works
Most image-generation models use diffusion. During training, the model learns to remove noise that has been added to real images, guided by their text descriptions. To generate, it starts from random noise and removes noise step by step, guided by the prompt, until an image emerges that matches the description. Other models generate images token by token, like language models; the GPT-image models combine image generation with a language model's understanding of detailed instructions, including rendering text in images.
Generation and editing
Image models support several operations. Text-to-image generation creates a new image from a prompt. Image editing takes one or more input images and a prompt, for example to place a product in a new scene or change its style. Inpainting regenerates only a masked region and keeps the rest unchanged. Parameters control the image size (aspect ratio), quality (which affects detail, time and cost) and the number of images. In Foundry, image models include GPT-image models and FLUX models from Black Forest Labs.
Effective image prompts describe the subject, the setting, the style (photograph, watercolour, flat illustration), the composition and camera angle, the lighting and what to avoid. Prompts are refined iteratively by changing one element at a time.
The following diagram compares the inputs and outputs of the three operations.

Generate, edit or inpaint?
Video generation
Video-generation models create short clips from a text prompt or a reference image, keeping objects consistent from frame to frame; some also generate audio. Because a clip takes much longer to produce than an image, video generation runs as an asynchronous job that the application creates, polls and then downloads. Video models are newer and change often: OpenAI's Sora models were offered in Foundry until the last version retired in October 2026, so check the Foundry catalog for the models and versions currently available.
Video generation
Responsible use of generated media
Guardrails filter harmful prompts and generated images. Images and videos from Azure OpenAI models include C2PA content credentials that record their AI origin, supporting transparency. Organizations should also avoid generating realistic images of real people without consent and review generated media before publishing it.
Working with generated media
Generate or edit
A furniture retailer has a photo of a sofa in a plain studio. Marketing wants the same sofa shown in a sunlit living room, and separately wants only the cushion colour changed from grey to blue in the original photo.
Placing the existing sofa in a new scene is an image edit that uses the photo as input. Changing only the cushions is inpainting with a mask over the cushions, so the rest of the photo stays identical. Generating a new image from text alone would not reproduce the retailer's actual sofa.
How does a diffusion model create an image?
Show answer
It starts from noise and removes it step by step, guided by the prompt.
Exam Tips
Remember for the exam
- Diffusion models create images by removing noise step by step, guided by the prompt.
- Edits use input images; inpainting changes only a masked region.
- Video generation runs as an asynchronous job.
- Generated media from Azure OpenAI models carries C2PA content credentials.