Skip to content

kylemath/Sora

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sora 2 video generation — quickstart (Python)

Prereqs: Python 3.9+, macOS. This project uses a virtual environment and avoids global installs.

Setup

  1. Create venv and install deps
cd /Users/kylemathewson/Sora
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
  1. Configure API key and verify organization

Copy .env.example to .env and set OPENAI_API_KEY:

cp .env.example .env
echo "OPENAI_API_KEY=sk-..." >> .env

Important: Your OpenAI organization must be verified to use Sora models. Visit https://platform.openai.com/settings/organization/general and click "Verify Organization". Access propagates within 15 minutes after verification.

  1. Discover Sora-capable models (optional)
source .venv/bin/activate
python scripts/list_models.py
  1. Generate a video
source .venv/bin/activate
python scripts/generate_video.py \
  --prompt "A macro cinematic shot of ocean waves at sunrise, 4K film look" \
  --duration 8 \
  --resolution 1920x1080 \
  --out videos/ocean_sunrise.mp4

Notes

  • This starter attempts the official Python SDK video method first and falls back to a raw HTTPS call if necessary. If you see a 404/unsupported error, upgrade the openai package and re-run.
  • Refer to the official guide for parameter details: https://platform.openai.com/docs/guides/video-generation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages