Sora Video Generation

Generate videos using OpenAI's Sora API. Use when the user asks to generate, create, or make videos from text prompts or reference images. Supports image-to-video generation with automatic resizing.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
1 · 1.6k · 3 current installs · 3 all-time installs
byPaul de Lavallaz@PauldeLavallaz
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
!
Purpose & Capability
Name/description match the implementation: the script calls an OpenAI client to create/retrieve videos and downloads content. However, the registry metadata declares no required credentials while the script clearly requires an OpenAI API key (OPENAI_API_KEY or --api-key). That mismatch is unexpected and should have been declared.
Instruction Scope
SKILL.md and the script stay within the stated purpose: they accept prompt/image, resize images locally, call the Sora video create/retrieve endpoints, poll status, and download the resulting MP4. The script only reads the provided input image path, writes the output file, and uses the provided or environment API key — it does not attempt to read other system files or contact unknown hosts.
Install Mechanism
This is instruction-only (no install spec). The script lists dependencies in comments (openai, httpx, pillow) but there is no automated install step; that is not dangerous but is an operational omission — users must install dependencies themselves. No downloads from unknown URLs or extracted archives are present.
!
Credentials
The script requires an OpenAI API key (OPENAI_API_KEY or --api-key) to function. The registry metadata does not list any required env vars or primary credential, creating a discrepancy. Aside from the OpenAI key, no other secrets or unrelated env vars are requested, which is proportionate.
Persistence & Privilege
The skill is not always-enabled and has no install-time persistence behavior or attempts to modify other skills or system-wide config. It does not request elevated or persistent privileges.
What to consider before installing
Key points to consider before installing: - This tool will send your prompts and any reference images to OpenAI's video endpoints and requires your OpenAI API key (OPENAI_API_KEY or --api-key). The registry metadata failing to declare this is an inconsistency you should confirm with the publisher before proceeding. - The included script depends on Python packages (openai, httpx, pillow) but there is no install step — install those in a controlled environment (virtualenv) before running. - The script only talks to api.openai.com and saves the returned MP4; it does not contact other endpoints or exfiltrate unspecified data, based on the provided files. - Verify you are comfortable providing your OpenAI API key to this code; consider creating a dedicated API key with limited billing/quota for use with third-party skills. - If you need higher assurance, request the publisher to update registry metadata to declare OPENAI_API_KEY and to provide a reproducible install spec (requirements.txt or install script) and/or review their ownership/source (homepage is missing).

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk97dae54np4jqhw2s98wer4t2h80k32p

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

Sora Video Generation

Generate videos using OpenAI's Sora API.

API Reference

Endpoint: POST https://api.openai.com/v1/videos

Parameters

ParameterValuesDescription
promptstringText description of the video (required)
input_referencefileOptional image that guides generation
modelsora-2, sora-2-proModel to use (default: sora-2)
seconds4, 8, 12Video duration (default: 4)
size720x1280, 1280x720, 1024x1792, 1792x1024Output 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

FlagDescriptionDefault
--prompt, -pVideo description (required)-
--filename, -fOutput file path (required)-
--input-image, -iReference image pathNone
--seconds, -sDuration: 4, 8, or 128
--size, -szResolution720x1280
--model, -msora-2 or sora-2-prosora-2
--api-key, -kOpenAI API keyenv var
--poll-intervalCheck status every N seconds10

API Key

Set OPENAI_API_KEY environment variable or pass --api-key.

Prompt Engineering for Video

Good prompts include:

  1. Camera movement: dolly, pan, zoom, tracking shot
  2. Motion description: swirling, rising, falling, shifting
  3. Lighting: golden hour, candlelight, dramatic rim lighting
  4. Atmosphere: steam, particles, bokeh, haze
  5. 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

  1. Generate image with Nano Banana Pro (or use existing)
  2. Pass image as --input-image to Sora
  3. Write prompt describing desired motion/atmosphere
  4. 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

Files

2 total
Select a file
Select a file to preview.

Comments

Loading comments…