The model and what it does
Sora 2 is an OpenAI model that creates realistic and imaginative video from text, images, or existing videos. You deploy it from the Foundry portal's Models list (Build → Models → search "Sora-2" → Deploy).
| Feature | Description |
|---|---|
| Text to video | Generate video from a natural-language prompt. |
| Image to video | Turn an existing image into video content. |
| Video remix | Make targeted adjustments to an existing video without full regeneration. |
| Audio generation | Supports audio in the output video. |
| Resolutions | Portrait 720×1280 and landscape 1280×720. |
| Duration | 4, 8, or 12 seconds. |
Generation and good prompts
Generation is asynchronous: you submit a request and retrieve the finished video later. In the Video playground you set prompt, resolution, and duration, then Generate (typically 1–5 minutes); "View code" gives cURL samples. Content-moderation filters block harmful prompts.
Key concept · Anatomy of a strong prompt
Effective prompts specify camera framing (shot type/angle), subject details, action in beats (steps, gestures, pauses), lighting and palette, and style. "Wet asphalt, neon signs reflecting in puddles" beats "a beautiful street at night"; "cyclist pedals three times, brakes, and stops" beats "person moves quickly." Key tip: shorter clips perform better — for longer content, generate two 4-second clips and stitch them rather than one 8-second clip. Keep it to one camera move and one subject action per shot, use beats for timing, and iterate — small changes shift the outcome a lot.
The job loop, references, and remix
In Python (OpenAI SDK against the Sora deployment) the pattern is three steps: create the job, poll for completion, then download the result.
Key concept · Create → poll → download
client.videos.create(model="sora-2", prompt=…, size="1280x720", seconds="4") returns a job; loop while video.status is not in ["completed","failed","cancelled"], sleeping between client.videos.retrieve(id) calls; on completion, client.videos.download_content(id, variant="video") and write the .mp4. Status values: queued, in_progress, completed, failed, cancelled.
Key concept · Reference images and remix
Reference image — pass input_reference to anchor the first frame; its resolution must match the target size exactly (JPEG/PNG/WebP), and human faces are rejected (use landscapes, objects, or animated characters). Remix — client.videos.remix(video_id=…, prompt=…) modifies an existing video while preserving structure; limit it to one clear change for best fidelity. Constraints: max two simultaneous jobs, and completed videos are available for 24 hours.
Chapter 25 quiz
Fifteen questions on Sora 2, prompting, and the async job pattern. Answer first, then expand Show answer.
Part A · Multiple choice
Which model does this module use for video generation?
- A Sora 2
- B FLUX.1
- C gpt-image-1
- D Phi-4
Show answer
A — Sora 2. An OpenAI video model in Foundry.
Video generation is best described as:
- A Asynchronous — submit a job, retrieve when ready
- B Instant, single-call
- C Streaming only
- D Impossible in code
Show answer
A. Create → poll → download.
What durations does Sora 2 support?
- A 4, 8, or 12 seconds
- B 1–60 minutes
- C Exactly 30 seconds
- D Unlimited
Show answer
A. Default 4; shorter clips perform better.
Which is a strong video prompt?
- A "Wet asphalt, neon signs reflecting in puddles"
- B "A beautiful street at night"
- C "Cinematic look"
- D "Person moves quickly"
Show answer
A. Specific framing, subject, and detail.
What must be true of a reference image?
- A Its resolution must match the target video size exactly
- B It must contain a human face
- C It must be a GIF
- D It must be 4K
Show answer
A. And human faces are rejected — use landscapes/objects/animated characters.
Which method modifies an existing video while preserving its structure?
- A client.videos.remix
- B client.videos.create
- C client.images.generate
- D client.videos.delete
Show answer
A — remix. With a video_id and a new prompt.
What are the two landscape/portrait resolutions?
- A 1280×720 and 720×1280
- B 1024×1024 and 512×512
- C 1920×1080 and 3840×2160
- D 640×480 only
Show answer
A. Landscape 1280×720, portrait 720×1280.
Part B · True or false
For a longer clip, it's often better to make two 4-second clips and stitch them.
Show answer
True. Shorter clips perform better.
Completed videos remain available indefinitely.
Show answer
False. They're available for 24 hours.
You can run at most two simultaneous video-creation jobs.
Show answer
True. A rate limit on concurrent jobs.
Sora 2 can generate audio in its output videos.
Show answer
True. Audio generation is a listed capability.
Prompts are subject to content-moderation filtering.
Show answer
True. Harmful-content prompts are blocked.
Part C · Short answer
Name the three steps of the Python video-generation pattern.
Show answer
Create the job, poll for completion, and download the result.
List the possible job status values.
Show answer
queued, in_progress, completed, failed, cancelled.
Name three elements of a strong video prompt.
Show answer
Any three: camera framing, subject, action (in beats), lighting/palette, and style.