Lesson 78 of 2116
Sora 2 API — video generation, programmable
Sora 2 moved from consumer-only to API in 2026. 60-second 1080p video from a prompt, callable from code.
Lesson map
What this lesson covers
Learning path
The main moves in order
- 1What changed from Sora 1
- 2Sora 2
- 3video generation API
- 4OpenAI
Concept cluster
Terms to connect while reading
Sora launched in 2024 as a consumer demo. In 2026 OpenAI opened an API. Developers can now generate 1080p video up to 60 seconds from a text prompt, an image, or another video — programmatically.
Section 1
What changed from Sora 1
- 60 seconds (up from 20) with stable subject consistency.
- Audio synchronously generated — Veo 3 forced OpenAI's hand here.
- API access with tiered pricing (1080p $0.06/sec, 4K $0.24/sec at launch).
- Much better physics and object permanence.
- C2PA provenance metadata baked in.
A minimal Sora 2 API call (syntax current as of April 2026)
from openai import OpenAI
client = OpenAI()
response = client.videos.generate(
model="sora-2",
prompt="A librarian places a book on a shelf, soft afternoon light.",
duration_seconds=10,
resolution="1080p",
aspect_ratio="16:9",
)
print(response.video_url)Key terms in this lesson
End-of-lesson quiz
Check what stuck
15 questions · Score saves to your progress.
Tutor
Curious about “Sora 2 API — video generation, programmable”?
Ask anything about this lesson. I’ll answer using just what you’re reading — short, friendly, grounded.
Progress saved locally in this browser. Sign in to sync across devices.
Related lessons
Keep going
Creators · 38 min
Open-Source vs. Closed Image Models
Flux Pro vs. Flux Dev. Midjourney vs. Stable Diffusion. The choice affects product architecture, cost, and what's possible. Here's the honest tradeoff.
Creators · 40 min
Video Generation at the API Level
Behind the glossy UIs, video models expose REST APIs. Here's how to call Sora, Veo, and Runway programmatically and build production pipelines.
Creators · 38 min
Audio Synthesis Pipelines
ElevenLabs, Stable Audio, and Suno expose APIs for voice, SFX, and music. Here's how to compose them into a production audio pipeline.
