Using Sora 2 on OpenAI API

Implementation guide · Sora · OpenAI

Serverless

OpenAI API exposes Sora 2 through model ID sora-2. Use the setup steps, sourced pricing, capabilities, and official provider links below to validate this route before deployment.

Last refreshed 2026-05-20. Next refresh: weekly.

Quick Start

  1. 1
    Create an account at OpenAI API and generate an API key.
  2. 2
    Use the OpenAI API SDK or REST API to call sora-2 — see the documentation for request format.
  3. 3
    You'll be billed $0.1/sec of video output. See full pricing.

Code Examples

Install
pip install openai
API key
OPENAI_API_KEY
Model ID
sora-2

Use the model slug directly, e.g. "gpt-4o" or "gpt-4.1-mini".

import os
from openai import OpenAI

client = OpenAI()  # reads OPENAI_API_KEY from env
response = client.chat.completions.create(
    model="sora-2",
    messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)

Pricing on OpenAI API

TypeRate
Video output$0.1/sec

Capabilities

Multimodal

About Sora 2

OpenAI's second-generation text-to-video model generating up to 20-second videos at 720p with synchronized audio from text and image prompts; deprecated with API shutdown September 24, 2026.

Model Specs

Released2025-09-30
ArchitectureDiffusion

Provider

OpenAI API

OpenAI

San Francisco, California, United States