Sora Video Generation
Generate videos using OpenAI's Sora API.
API Reference
Endpoint: POST https://api.openai.com/v1/videos
Parameters
| Parameter |
Values |
Description |
prompt |
string |
Text description of the video (required) |
input_reference |
file |
Optional image that guides generation |
model |
sora-2, sora-2-pro |
Model to use (default: sora-2) |
seconds |
4, 8, 12 |
Video duration (default: 4) |
size |
720x1280, 1280x720, 1024x1792, 1792x1024 |
Output resolution |
Important Notes
- Image dimensions must match video size exactly - the script auto-resizes
- Video generation takes 1-3 minutes typically
- Videos expire after ~1 hour - download immediately
Usage
# Basic text-to-video
uv run ~/.clawdbot/skills/sora/scripts/generate_video.py \
--prompt "A cat playing piano" \
--filename "output.mp4"
# Image-to-video (auto-resizes image)
uv run ~/.clawdbot/skills/sora/scripts/generate_video.py \
--prompt "Slow dolly shot, steam rising, warm lighting" \
--filename "output.mp4" \
--input-image "reference.png" \
--seconds 8 \
--size 720x1280
# With specific model
uv run ~/.clawdbot/skills/sora/scripts/generate_video.py \
--prompt "Cinematic scene" \
--filename "output.mp4" \
--model sora-2-pro \
--seconds 12
Script Parameters
| Flag |
Description |
Default |
--prompt, -p |
Video description (required) |
- |
--filename, -f |
Output file path (required) |
- |
--input-image, -i |
Reference image path |
None |
--seconds, -s |
Duration: 4, 8, or 12 |
8 |
--size, -sz |
Resolution |
720x1280 |
--model, -m |
sora-2 or sora-2-pro |
sora-2 |
--api-key, -k |
OpenAI API key |
env var |
--poll-interval |
Check status every N seconds |
10 |
API Key
Set OPENAI_API_KEY environment variable or pass --api-key.
Prompt Engineering for Video
Good prompts include:
- Camera movement: dolly, pan, zoom, tracking shot
- Motion description: swirling, rising, falling, shifting
- Lighting: golden hour, candlelight, dramatic rim lighting
- Atmosphere: steam, particles, bokeh, haze
- Mood/style: cinematic, commercial, lifestyle, editorial
Example prompts:
Food commercial:
Slow dolly shot of gourmet dish, soft morning sunlight streaming through window,
subtle steam rising, warm cozy atmosphere, premium food commercial aesthetic
Lifestyle:
Golden hour light slowly shifting across mountains, gentle breeze rustling leaves,
serene morning atmosphere, premium lifestyle commercial
Product shot:
Cinematic close-up, dramatic lighting with warm highlights,
slow reveal, luxury commercial style
Workflow: Image → Video
- Generate image with Nano Banana Pro (or use existing)
- Pass image as
--input-image to Sora
- Write prompt describing desired motion/atmosphere
- Script auto-resizes image to match video dimensions
Output
- Videos saved as MP4
- Typical file size: 1.5-3MB for 8 seconds
- Resolution matches
--size parameter
1---
2name: sora
3description: |
4 Generate videos from text prompts or reference images using OpenAI Sora.
5
6 ✅ USE WHEN:
7 - Need AI-generated video from text description
8 - Want image-to-video (animate a still image)
9 - Creating cinematic/artistic video content
10 - Need motion/animation without lip-sync
11
12 ❌ DON'T USE WHEN:
13 - Need lip-sync (person speaking) → use veed-ugc or ugc-manual
14 - Just need image generation → use nano-banana-pro or morpheus
15 - Editing existing videos → use Remotion
16 - Need UGC-style talking head → use veed-ugc
17
18 INPUT: Text prompt + optional reference image
19 OUTPUT: MP4 video (various resolutions/durations)
20metadata:
21 source: https://skillmd.com/skills/modbender/sora
22---
23
24# Sora Video Generation
25
26Generate videos using OpenAI's Sora API.
27
28## API Reference
29
30**Endpoint:** `POST https://api.openai.com/v1/videos`
31
32### Parameters
33
34| Parameter | Values | Description |
35|-----------|--------|-------------|
36| `prompt` | string | Text description of the video (required) |
37| `input_reference` | file | Optional image that guides generation |
38| `model` | `sora-2`, `sora-2-pro` | Model to use (default: sora-2) |
39| `seconds` | `4`, `8`, `12` | Video duration (default: 4) |
40| `size` | `720x1280`, `1280x720`, `1024x1792`, `1792x1024` | Output resolution |
41
42### Important Notes
43
44- **Image dimensions must match video size exactly** - the script auto-resizes
45- Video generation takes 1-3 minutes typically
46- Videos expire after ~1 hour - download immediately
47
48## Usage
49
50```bash
51# Basic text-to-video
52uv run ~/.clawdbot/skills/sora/scripts/generate_video.py \
53 --prompt "A cat playing piano" \
54 --filename "output.mp4"
55
56# Image-to-video (auto-resizes image)
57uv run ~/.clawdbot/skills/sora/scripts/generate_video.py \
58 --prompt "Slow dolly shot, steam rising, warm lighting" \
59 --filename "output.mp4" \
60 --input-image "reference.png" \
61 --seconds 8 \
62 --size 720x1280
63
64# With specific model
65uv run ~/.clawdbot/skills/sora/scripts/generate_video.py \
66 --prompt "Cinematic scene" \
67 --filename "output.mp4" \
68 --model sora-2-pro \
69 --seconds 12
70```
71
72## Script Parameters
73
74| Flag | Description | Default |
75|------|-------------|---------|
76| `--prompt`, `-p` | Video description (required) | - |
77| `--filename`, `-f` | Output file path (required) | - |
78| `--input-image`, `-i` | Reference image path | None |
79| `--seconds`, `-s` | Duration: 4, 8, or 12 | 8 |
80| `--size`, `-sz` | Resolution | 720x1280 |
81| `--model`, `-m` | sora-2 or sora-2-pro | sora-2 |
82| `--api-key`, `-k` | OpenAI API key | env var |
83| `--poll-interval` | Check status every N seconds | 10 |
84
85## API Key
86
87Set `OPENAI_API_KEY` environment variable or pass `--api-key`.
88
89## Prompt Engineering for Video
90
91### Good prompts include:
92
931. **Camera movement**: dolly, pan, zoom, tracking shot
942. **Motion description**: swirling, rising, falling, shifting
953. **Lighting**: golden hour, candlelight, dramatic rim lighting
964. **Atmosphere**: steam, particles, bokeh, haze
975. **Mood/style**: cinematic, commercial, lifestyle, editorial
98
99### Example prompts:
100
101**Food commercial:**
102```
103Slow dolly shot of gourmet dish, soft morning sunlight streaming through window,
104subtle steam rising, warm cozy atmosphere, premium food commercial aesthetic
105```
106
107**Lifestyle:**
108```
109Golden hour light slowly shifting across mountains, gentle breeze rustling leaves,
110serene morning atmosphere, premium lifestyle commercial
111```
112
113**Product shot:**
114```
115Cinematic close-up, dramatic lighting with warm highlights,
116slow reveal, luxury commercial style
117```
118
119## Workflow: Image → Video
120
1211. Generate image with Nano Banana Pro (or use existing)
1222. Pass image as `--input-image` to Sora
1233. Write prompt describing desired motion/atmosphere
1244. Script auto-resizes image to match video dimensions
125
126## Output
127
128- Videos saved as MP4
129- Typical file size: 1.5-3MB for 8 seconds
130- Resolution matches `--size` parameter