Skip to content

🎬 A beautiful web interface for OpenAI's Sora Video API

License

Notifications You must be signed in to change notification settings

promptadvisers/sora-studio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 Sora Studio - OpenAI Video API Web Interface

Sora Studio Banner Version License Status

A beautiful, modern web interface for generating AI videos with OpenAI's Sora API

Features β€’ Quick Start β€’ Demo β€’ Documentation


πŸ“Έ Screenshots

🎨 Create Tab - Generate Your Videos

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Sora Studio                              βš™οΈ Settings   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  βž• Create Video  β”‚  πŸ“Š Dashboard  β”‚  πŸ–ΌοΈ Gallery      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                           β”‚
β”‚  πŸ“ Prompt:                                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ A golden retriever puppy playing in a field      β”‚  β”‚
β”‚  β”‚ of colorful wildflowers at sunset                β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                           β”‚
β”‚  🎬 Model: sora-2                                        β”‚
β”‚                                                           β”‚
β”‚  ⏱️ Duration:    [4s] [6s] [8s]                         β”‚
β”‚                                                           β”‚
β”‚  πŸ“ Resolution:                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ Portrait β”‚ β”‚   Tall   β”‚ β”‚Landscape β”‚ β”‚   Wide   β”‚  β”‚
β”‚  β”‚ 720x1280 β”‚ β”‚1024x1808 β”‚ β”‚1280x720  β”‚ β”‚1808x1024 β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                           β”‚
β”‚  πŸ“Ž Optional Reference: [Upload Image/Video]             β”‚
β”‚                                                           β”‚
β”‚                         [πŸͺ„ Generate Video]              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“Š Dashboard - Monitor Progress

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Video Jobs                    [Filter β–Ό] [Search] [πŸ”„] β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  ⏱️ Auto-refreshing every 10 seconds  [⏸️ Pause]        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                           β”‚
β”‚  🟒 completed   video_abc123                             β”‚
β”‚  "A golden retriever puppy playing..."                   β”‚
β”‚  πŸ“… 10/7/2025, 2:11 PM  β”‚  🎬 8s  β”‚  πŸ“ 1280x720        β”‚
β”‚  Progress: β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%                     β”‚
β”‚  [πŸ‘οΈ Details] [⬇️ Download] [🎭 Remix] [πŸ—‘οΈ Delete]      β”‚
β”‚                                                           β”‚
β”‚  πŸ”΅ processing   video_xyz789                            β”‚
β”‚  "Ocean waves crashing..."                               β”‚
β”‚  πŸ“… 10/7/2025, 2:15 PM  β”‚  🎬 6s  β”‚  πŸ“ 720x1280        β”‚
β”‚  Progress: β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 45%                     β”‚
β”‚  [πŸ‘οΈ Details] [πŸ—‘οΈ Delete]                                β”‚
β”‚                                                           β”‚
β”‚  🟑 queued   video_def456                                β”‚
β”‚  "Time-lapse of clouds..."                               β”‚
β”‚  πŸ“… 10/7/2025, 2:16 PM  β”‚  🎬 4s  β”‚  πŸ“ 1024x1808       β”‚
β”‚  Progress: β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 0%                      β”‚
β”‚  [πŸ‘οΈ Details] [πŸ—‘οΈ Delete]                                β”‚
β”‚                                                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ–ΌοΈ Gallery - Browse Your Creations

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Completed Videos                      [πŸ“₯ Export History]β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
β”‚  β”‚ 🎬 VIDEO β”‚  β”‚ 🎬 VIDEO β”‚  β”‚ 🎬 VIDEO β”‚              β”‚
β”‚  β”‚  PLAYS   β”‚  β”‚  PLAYS   β”‚  β”‚  PLAYS   β”‚              β”‚
β”‚  β”‚  ON LOAD β”‚  β”‚  ON LOAD β”‚  β”‚  ON LOAD β”‚              β”‚
β”‚  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€              β”‚
β”‚  β”‚ Prompt:  β”‚  β”‚ Prompt:  β”‚  β”‚ Prompt:  β”‚              β”‚
β”‚  β”‚ A golden β”‚  β”‚ Ocean    β”‚  β”‚ Time-    β”‚              β”‚
β”‚  β”‚ retrieverβ”‚  β”‚ waves... β”‚  β”‚ lapse... β”‚              β”‚
β”‚  β”‚ πŸ“… 10/7  β”‚  β”‚ πŸ“… 10/7  β”‚  β”‚ πŸ“… 10/7  β”‚              β”‚
β”‚  β”‚ 🎬 8s    β”‚  β”‚ 🎬 6s    β”‚  β”‚ 🎬 4s    β”‚              β”‚
β”‚  β”‚[⬇️][🎭]  β”‚  β”‚[⬇️][🎭]  β”‚  β”‚[⬇️][🎭]  β”‚              β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚
β”‚                                                           β”‚
β”‚  ← Hover over videos to hear audio! β†’                    β”‚
β”‚  ← Click to view full details β†’                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

✨ Features

🎬 Video Generation

  • Text-to-Video - Transform descriptions into videos
  • Multiple Durations - Choose 4, 6, or 8 seconds
  • 4 Resolutions - Portrait, Landscape, and HD options
  • Reference Upload - Guide generation with images/videos
  • Real-time Progress - Watch your video generate live

πŸ“Š Dashboard

  • Auto-refresh - Updates every 10 seconds automatically
  • Status Tracking - Visual progress bars for each video
  • Filter & Search - Find videos quickly
  • Bulk Actions - Download, remix, or delete multiple videos

πŸ–ΌοΈ Gallery

  • Instant Thumbnails - See all videos in < 1 second
  • Auto-play Previews - Videos load and play on hover
  • Audio on Hover - Unmute by moving your mouse over
  • One-click Actions - Download or remix directly

🎭 Remix Feature

  • Create Variations - Build on successful generations
  • Prompt Evolution - Extend or modify existing videos
  • Track History - See which videos are remixes

βš™οΈ Settings

  • API Key Storage - Persistent .env file support
  • Default Preferences - Set preferred duration and resolution
  • Auto-refresh Control - Customize update interval
  • Data Management - Export or clear job history

πŸš€ Quick Start

Prerequisites

  • Modern web browser (Chrome, Firefox, Safari, Edge)
  • OpenAI API key with Sora access
  • Python 3 (for local server)

Installation

1️⃣ Clone the repository

git clone https://github.com/yourusername/sora-studio.git
cd sora-studio

2️⃣ Add your API key

# Edit .env file
nano .env

Add your key:

OPENAI_API_KEY=sk-your-api-key-here

3️⃣ Start the server

# Make script executable
chmod +x scripts/start-server.sh

# Start server
./scripts/start-server.sh

4️⃣ Open in browser

http://localhost:8000

That's it! πŸŽ‰


🎯 How It Works

1️⃣ Create a Video

You type a prompt β†’ Click "Generate" β†’ Job created

Example Prompts:

  • "A golden retriever puppy playing in a field of flowers at sunset"
  • "Ocean waves crashing against rocky cliffs during a storm"
  • "Time-lapse of clouds moving across a vibrant sunset sky"

2️⃣ Monitor Progress

Dashboard shows:
β”œβ”€β”€ 🟑 Queued (waiting to start)
β”œβ”€β”€ πŸ”΅ Processing (generating... 45%)
└── 🟒 Completed (ready to download!)

Auto-refresh every 10 seconds - No manual clicking needed!

3️⃣ Download & Enjoy

Video complete β†’ Click "Download" β†’ Save as MP4

Or "Remix" to create variations!


πŸ“– Detailed Workflow

Creating Your First Video

graph LR
    A[Open App] --> B[Enter Prompt]
    B --> C[Select Duration & Resolution]
    C --> D[Click Generate]
    D --> E[Job Created]
    E --> F[Monitor Dashboard]
    F --> G{Status?}
    G -->|Processing| H[Wait & Watch Progress]
    H --> F
    G -->|Completed| I[Download Video!]
    I --> J[Remix or Create New]
Loading

Step-by-step:

  1. Navigate to "Create Video" tab
  2. Enter your prompt - Be descriptive!
    Example: "A close-up shot of a hummingbird hovering near
    a red hibiscus flower in slow motion with morning sunlight"
    
  3. Choose settings:
    • Duration: 4s (quick), 6s (standard), or 8s (extended)
    • Resolution: Portrait (9:16) or Landscape (16:9)
  4. Optional: Upload reference image/video
  5. Click "Generate Video"
  6. Switch to Dashboard to monitor progress

🎨 API Integration

Endpoints Used

Endpoint Purpose When
POST /videos Create video User clicks "Generate"
GET /videos/{id} Check status Auto-refresh (every 10s)
GET /videos List all videos Dashboard load
GET /videos/{id}/content Download video User clicks "Download"
POST /videos/{id}/remix Remix video User clicks "Remix"
DELETE /videos/{id} Delete video User clicks "Delete"

Video Variants

variant=thumbnail  β†’ Static image (instant load) πŸ“Έ
variant=video      β†’ Full MP4 file (for download) 🎬
variant=spritesheet β†’ Preview frames (future use) 🎞️

πŸ—οΈ Architecture

File Structure

sora-studio/
β”œβ”€β”€ πŸ“„ index.html              # Main UI (entry point)
β”œβ”€β”€ πŸ“„ .env                    # Your API key
β”œβ”€β”€ πŸ“„ README.md               # This file
β”‚
β”œβ”€β”€ πŸ“ src/                    # Source code
β”‚   β”œβ”€β”€ app.js                 # Application logic (40 KB)
β”‚   └── config.js              # Config loader (2 KB)
β”‚
β”œβ”€β”€ πŸ“ scripts/                # Utility scripts
β”‚   └── start-server.sh        # Server startup
β”‚
└── πŸ“ docs/                   # Documentation
    β”œβ”€β”€ START_HERE.md          # Quick start
    β”œβ”€β”€ SETUP.md               # Detailed setup
    └── openai-video-api-guide.md  # API reference

Technology Stack

Frontend:

  • HTML5 - Structure
  • Tailwind CSS - Styling
  • Vanilla JavaScript - Logic
  • Font Awesome - Icons

Backend:

  • Python HTTP Server - Local hosting
  • OpenAI API - Video generation

No framework needed! Pure HTML/CSS/JS for simplicity.


🎯 Key Features Explained

πŸ”„ Auto-Refresh

// Every 10 seconds:
Check for active jobs (queued or processing)
↓
Fetch latest status from API
↓
Update UI automatically
↓
Show notification if completed

Benefits:

  • βœ… No manual refresh needed
  • βœ… Real-time progress updates
  • βœ… Notifications when videos complete
  • βœ… Configurable interval (5-60s)

πŸ–ΌοΈ Gallery Optimization

// Two-stage loading:
1. Load thumbnail (instant - 50KB)
   ↓ User sees content immediately
2. Load video in background (5-10MB)
   ↓ Ready when user hovers
3. Hover to play with audio
   ↓ Smooth playback, no delay

Performance:

  • πŸ“Έ Thumbnails: < 1 second
  • 🎬 Full videos: Background loading
  • πŸš€ 20x faster than loading all videos upfront

🎭 Remix Feature

Create variations of successful videos:

Original prompt:
"A cat playing piano on stage"

Remix prompt:
"Same scene but now the cat takes a bow to a cheering audience"

Result:
β†’ New video building on the original!

πŸ“Š Status Indicators

Status Icon Color Meaning
Queued 🟑 Yellow Waiting to start
Processing πŸ”΅ Blue Generating video
Completed 🟒 Green Ready to download
Failed πŸ”΄ Red Error occurred
Cancelled βšͺ Gray Job cancelled

βš™οΈ Configuration

Environment Variables

# .env file
OPENAI_API_KEY=sk-your-key-here

Settings Panel

Default Preferences:

  • Duration: 4, 6, or 8 seconds
  • Resolution: 720x1280, 1024x1808, 1280x720, 1808x1024
  • Auto-refresh interval: 5-60 seconds

Data Management:

  • Export job history as JSON
  • Clear all local data
  • API key management

πŸ”’ Security

API Key Storage

Priority: .env file β†’ localStorage

.env file (recommended):
- Stored locally
- Not committed to git (.gitignore)
- More secure for development

localStorage (fallback):
- Stored in browser
- Accessible to JavaScript
- Use .env instead

Best Practices

βœ… Do:

  • Store API key in .env file
  • Keep .env in .gitignore
  • Use environment variables in production
  • Implement backend proxy for public apps

❌ Don't:

  • Commit API keys to GitHub
  • Share your .env file
  • Use client-side keys in production
  • Store keys in plain text in code

πŸŽ“ Usage Tips

Writing Great Prompts

Good Prompt βœ…

A close-up shot of a hummingbird hovering near a red hibiscus
flower. The scene is shot in slow motion with morning sunlight
creating a soft glow. The background is a blurred garden.

Bad Prompt ❌

bird and flower

Tips:

  • Be specific and descriptive
  • Include details about lighting, mood, camera angles
  • Mention movement and action
  • Specify time of day or weather

Optimizing for Speed

For testing:

  • Use 4-second duration
  • Use lower resolution (720x1280)
  • Test prompts before full generation

For final videos:

  • Use 8-second duration
  • Use higher resolution (1808x1024)
  • Generate after testing prompt

Managing Videos

Organization:

  • Delete old test videos
  • Download important videos (they expire!)
  • Use remix to iterate on good results
  • Export history for backup

πŸ› Troubleshooting

Common Issues

1. API Key Not Working

# Check your key
cat .env

# Should show: OPENAI_API_KEY=sk-...
# If empty, add your key

2. Server Won't Start

# Make script executable
chmod +x scripts/start-server.sh

# Or run manually
python3 -m http.server 8000

3. Videos Not Auto-Refreshing

// Open browser console (F12)
// You should see:
πŸ” Checking jobs... Total: 1, Active: 1
πŸ“‘ Fetching latest status for video_xxx...
βœ… Auto-refresh complete

4. Download Fails

Error: Invalid value: 'mp4'
Solution: Already fixed! Refresh your browser.

5. Gallery Loads Slowly

Expected: Thumbnails show in < 1 second
If slow: Check internet connection
Tip: Videos load in background, give it time

πŸ“š Documentation

Document Description
START_HERE.md Quick start guide
SETUP.md Detailed setup instructions
openai-video-api-guide.md Complete API reference
DIRECTORY_STRUCTURE.md Folder organization guide
FIXES.md Bug fixes changelog

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

How to contribute:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“‹ Roadmap

Planned Features

  • Dark mode
  • Video thumbnail generation
  • Batch prompt upload (CSV)
  • Video comparison view
  • Custom resolution support
  • Progress notifications (desktop)
  • Video editing capabilities
  • Collaborative projects
  • Cloud storage integration
  • Mobile app (React Native)

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • OpenAI - For the amazing Sora API
  • Tailwind CSS - For beautiful styling
  • Font Awesome - For awesome icons
  • You! - For using Sora Studio

πŸ“ž Support

Issues?

Questions?


🌟 Show Your Support

Give a ⭐️ if this project helped you!


Made with ❀️ for video creators

GitHub Stars GitHub Forks

⬆ Back to Top

Releases

No releases published

Packages

 
 
 

Contributors