Generate and Edit Video
30-second answer
A Sora 2 video is an asynchronous job: you create it with a prompt, a size (720x1280 or 1280x720) and a duration of 4, 8 or 12 seconds, poll the status, then download the video. An input reference image must match the video size and can't contain a face. To edit a finished video, remix it by its video ID with a short prompt that asks for one change.
Simulate it » No Azure account neededExam objective: 3.1.2 Implement a solution that generates videos from text prompts and reference media. 3.1.4 Implement workflows to edit generated videos. (Skills measured as of April 16, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
Deploy <strong>sora-2</strong> from <strong>Models + endpoints</strong>. It's in preview, so check the availability table for regions and deployment type.
👆 Click the glowing item in the portal to continue
Read the steps as text
- Deploy sora-2 from Models + endpoints. It's in preview, so check the availability table for regions and deployment type.
- In the Video playground pick the size and duration, add an input reference image of the same size, and describe the shot: subject, action, light, camera.
- Video is asynchronous. You create the job, poll the status, then download the MP4. Don't block a web request on it.
- Two input rules to remember: the reference image must match the video size, and it can't contain a human face.
- To edit a finished video, remix it. Give the source video id and one short change. A single clear change keeps the rest of the clip stable.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
Generate and remix a video
Sora 2 makes video as an asynchronous job: create, poll until it's done, then download. Pick 720x1280 or 1280x720 and 4, 8 or 12 seconds. An input reference image must match the video size, and faces in it are rejected. Remix changes a finished video with a short prompt, ideally one change at a time.
🤔 What happens if…
Read this tour as text
- Generate and edit an image. A gpt-image deployment turns a prompt into pixels. Choose a size (1024x1024, 1024x1536 or 1536x1024), a quality (low, medium, high) and a format (PNG or JPEG). To change only part of a picture, send the image plus a mask: a PNG of the same size where the transparent area is what the model may repaint.
- Generate and remix a video. Sora 2 makes video as an asynchronous job: create, poll until it's done, then download. Pick 720x1280 or 1280x720 and 4, 8 or 12 seconds. An input reference image must match the video size, and faces in it are rejected. Remix changes a finished video with a short prompt, ideally one change at a time.
- Ask a model about a picture. A multimodal chat model such as gpt-4.1-mini reads images you send with the prompt. The prompt decides the result: a concise caption, a detailed one, alt text for accessibility, or an answer to a question that points to what is visible. Up to 10 images can go in one request, and detail (low, high, auto) trades cost for small text.
- Content Understanding turns media into fields. Azure Content Understanding in Foundry Tools runs an analyzer on an image or video and returns the same structured record every time. Start from prebuilt-imageSearch or prebuilt-videoSearch, or create a custom analyzer with fields that classify or generate. For video, segmentation splits the file into scenes with their own fields, key frames and transcript.
- Keep visual content safe. Images and video need gates too. A guardrail with image controls classifies hate, sexual, violence and self-harm content, and a custom analyzer can enforce your own visual policy (a competitor's logo, a missing watermark). Text inside a picture can be an indirect prompt injection: read it as data, scan it with Prompt Shields, and never let it grant a tool or an approval.
Marketing wants an 8-second clip of a brass tea kettle. Deploy Sora 2, discover its input rules, create the video from a reference image, then remix it with one change.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
Marketing wants a ten-second product clip in two formats, and one small lighting change means starting over.
😊 THE SOLUTION
Create the video as an asynchronous Sora 2 job, anchor it with a reference image and remix instead of regenerating.
- The web request times out✓ Create, poll the status, then download
- The kettle looks different in every shot✓ An input reference of the same size
- A tiny change means a new video✓ Remix the finished video with one change
Start with a question
You ordered a food delivery, and the app says 'in progress'. Why doesn't the pizza arrive the moment you tap the button?
Because cooking takes time. The app gives you an order number, you check the status now and then, and you collect the pizza when it’s ready.
Generating a video works the same way. You don’t get the video back in the reply. You get a video ID, you poll the job, and you download the file when its status says completed.
Explain it like I’m 10
The technical explanation
Deploy sora-2 on your Foundry resource. At the time of writing (25 November 2026) it’s a preview model, so confirm the regions and deployment type on Microsoft Learn.
Create, poll, download
import time
video = client.videos.create(
model="sora-2", # deployment name
prompt="A brass tea kettle on a wooden table, steam rising, soft morning light, slow push-in",
size="1280x720", seconds="8",
input_reference=open("product-1280x720.png", "rb"), # optional
)
while video.status in ("queued", "in_progress"):
time.sleep(20)
video = client.videos.retrieve(video.id)
if video.status == "completed":
client.videos.download_content(video.id).write_to_file("kettle.mp4")
| Control | Values and rules |
|---|---|
size | 720x1280 (portrait) or 1280x720 (landscape) |
seconds | 4, 8 or 12 |
input_reference | Same size as the video. No human faces |
| Prompt | Shot, subject, action, setting, light, camera movement |
| Status | queued, in_progress, completed |
The prompt does the creative work. A good one reads like a shot list: who or what is in frame, what moves, where, in what light, and how the camera behaves. Prompts that name real people or protected characters are rejected.
Edit with remix
remixed = client.videos.remix(
video.id,
prompt="Change the morning light to warm sunset light.",
)
Remix starts from a completed video, so everything you don’t mention stays close to the original. Ask for one change. If you pile on five, the result drifts, and you may be better off generating again.
Architect level Where do the finished videos live?
The service stores jobs and outputs for you, but treat that as temporary. Download the file into your own Blob Storage with your own retention, and delete jobs you don’t need. Generated videos can carry provenance information such as content credentials, so keep that metadata when you publish.
Real-world business scenario
Hearth and Brass
- The problem
- Every product clip needed a studio day, and a small lighting request meant a reshoot.
- What they used
- A Sora 2 deployment in Foundry, called from a background job. Product photos at 1280x720 are the input reference, and the team remixes approved clips for seasonal lighting.
- Why that choice
- The reference keeps the kettle looking like the real product, polling keeps the web app responsive, and remix avoids starting over.
- The result
- The team produced drafts for a whole range in a week and sent only the final choices to the studio.
When to use it and when not to
✓ Use it when…
- You need short concept clips, storyboards or social drafts.
- You have a product or scene image to anchor the first frame.
- You want small changes to an approved clip.
✕ Think twice when…
- You need videos longer than 12 seconds in one job.
- The idea needs a real person or a protected character.
- You must guarantee behaviour on a preview model in a launch-critical path.
↔ Alternatives to consider
- gpt-image to create stills or storyboards first.
- Real footage with Content Understanding to analyse it afterwards.
Test yourself with exercises
5 original practice questions in the AI-103 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner Why can't a web page wait for a Sora 2 video in one request?
Model answer
Video generation takes a while. The service returns a job with an ID, and my app polls the status until it's completed, then downloads the file.
Intermediate Your create call fails when you add a product photo as a reference. What do you check?
Model answer
I check that the image has exactly the same width and height as the video size, and that nobody's face is in it. Both rules cause a 400 error.
Experienced developer The client likes a video but wants warmer light. How do you handle it?
Model answer
I remix the finished video by its ID with one clear change in the prompt. A fresh generation could change everything, and a prompt with many changes drifts away from the original.
Scenario Sora 2 is in preview. How does that change your design?
Model answer
I wouldn't promise it for a customer-facing launch without a fallback. I'd keep limits and regions in configuration, check the Learn page before releases, and store finished videos in my own storage.
Quick revision
Key points
- Video generation is asynchronous: create, poll, download.
- Sizes are 720x1280 and 1280x720. Durations are 4, 8 or 12 seconds.
- The input reference must match the video size and can't include a human face.
- Remix edits a completed video by its ID. One clear change works best.
- Sora 2 was in preview on 25 November 2026, so check Learn for limits and regions.
Important terminology
- Sora 2
- The video generation model available in Microsoft Foundry (in preview as of 25 November 2026) that creates short videos from text and images.
- Asynchronous job
- A request that returns an ID right away while the work continues in the background, so the app polls the status.
- Input reference
- An image whose first frame anchors the video. It must match the video size and must not contain a human face.
- Remix
- An edit of a completed video, identified by its video ID, that applies a short change from a new prompt.
Common mistakes
- Holding a web request open until the video is ready.
- Using a reference image of a different size.
- Asking for many changes in one remix.
Exam tips
- "Edit a generated video" = remix with the video ID.
- "Video job status polling" = asynchronous pattern.
- "Reference image rejected" = check size match and faces.
Five quick revision questions
-
1.Which durations does Sora 2 accept?Show
4, 8 or 12 seconds.
-
2.Which sizes are allowed?Show
720x1280 or 1280x720.
-
3.What must an input reference match?Show
The video size exactly.
-
4.What happens to a reference image with a face?Show
It's rejected.
-
5.How do you edit a finished video?Show
Remix it by its video ID with a short prompt.
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: Multimodal Image Understanding: Captions, Alt Text and Visual Q&A
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.