Sora Video Generation Skill
Creates or manages Sora video jobs for the current project (product demos, marketing spots, cinematic shots, social clips, UI mocks). Defaults to sora-2 with structured prompt augmentation and prefers the bundled CLI for deterministic runs. Note: $sora is a skill tag in prompts, not a shell command.
When to use
- Generate a new video clip from a prompt
- Create a reusable character reference from a short non-human source clip
- Edit an existing generated video with a targeted prompt change
- Extend a completed video with a continuation prompt
- Poll status, list jobs, or download assets (video/thumbnail/spritesheet)
- Run a local multi-job queue now, or plan a true Batch API submission for offline rendering
Decision tree
- If the user has a short non-human reference clip they want to reuse across shots →
create-character
- If the user has a completed video and wants the next beat/continuation →
extend
- If the user has a completed video and wants a targeted change while preserving the shot →
edit
- If the user has a video id and wants status or assets →
status, poll, or download
- If the user needs many renders immediately inside Codex →
create-batch (local fan-out, not the Batch API)
- If the user needs many renders for offline processing or a studio pipeline → use the official Batch API flow described in
references/video-api.md
- Otherwise →
create (or create-and-poll if they need a ready asset in one step)
Workflow
- Decide intent: create vs create-character vs edit vs extend vs status/download vs local queue vs official Batch API.
- Collect inputs: prompt, model, size, seconds, any image reference, and any character IDs.
- Prefer CLI augmentation flags (
--use-case, --scene, --camera, etc.) instead of hand-writing a long structured prompt. If you already have a structured prompt file, pass --no-augment.
- Run the bundled CLI (
scripts/sora.py) with sensible defaults. For long prompts, prefer --prompt-file to avoid shell-escaping issues.
- For async jobs, poll until terminal status (or use
create-and-poll).
- Download assets (video/thumbnail/spritesheet) and save them locally before URLs expire.
- If the user wants continuity across many shots, create character assets first, then reference them in later
create calls.
- If the user wants to iterate on a completed shot, prefer
edit; if they want the shot to continue in time, prefer extend.
- Use one targeted change per iteration.
Authentication
OPENAI_API_KEY must be set for live API calls.
If the key is missing, give the user these steps:
- Create an API key in the OpenAI platform UI: https://platform.openai.com/api-keys
- Set
OPENAI_API_KEY as an environment variable in their system.
- Offer to guide them through setting the environment variable for their OS/shell if needed.
- Never ask the user to paste the full key in chat. Ask them to set it locally and confirm when ready.
Defaults & rules
- Default model:
sora-2 (use sora-2-pro for higher fidelity).
- Default size:
1280x720.
- Default seconds:
4 (allowed: "4", "8", "12", "16", "20").
- Always set size and seconds via API params; prose will not change them.
sora-2-pro is required for 1920x1080 and 1080x1920.
- Use up to two characters per generation.
- Use the OpenAI Python SDK (
openai package). If high-level SDK helpers lag the latest Sora guide, use low-level client.post/get/delete inside the official SDK rather than standalone HTTP code.
- Require
OPENAI_API_KEY before any live API call.
- If uv cache permissions fail, set
UV_CACHE_DIR=/tmp/uv-cache.
- Input reference images must be jpg/png/webp and should match target size.
- JSON
input_reference objects use either file_id or image_url; uploaded file paths use multipart.
- Download URLs expire after about 1 hour; copy assets to your own storage.
- Batch-generated videos remain downloadable for up to 24 hours after the batch completes.
create-batch in scripts/sora.py is a local concurrent queue, not the official Batch API.
- Prefer the bundled CLI and never modify
scripts/sora.py unless the user asks.
- Sora can generate audio; if a user requests voiceover/audio, specify it explicitly in the
Audio: and Dialogue: lines and keep it short.
API limitations
- Models are limited to
sora-2 and sora-2-pro.
- API access to Sora models requires an organization-verified account.
- Duration must be set via the
seconds parameter and currently supports 4, 8, 12, 16, and 20.
- Character uploads currently work best with short
2-4 second non-human MP4s in 16:9 or 9:16, at 720p-1080p.
- Extensions can add up to
20 seconds each, up to six times per source video, for a maximum total length of 120 seconds.
- Extensions currently do not support characters or image references.
- This skill supports editing existing generated videos by ID.
- The official Batch API currently supports
POST /v1/videos only, with JSON bodies rather than multipart uploads.
- Output sizes are limited by model (see
references/video-api.md for the supported sizes).
- Video creation is async; you must poll for completion before downloading.
- Rate limits apply by usage tier (do not list specific limits).
- Content restrictions are enforced by the API (see Guardrails below).
Guardrails (must enforce)
- Only content suitable for audiences under 18.
- No copyrighted characters or copyrighted music.
- No real people (including public figures).
- Input images with human faces are rejected.
- Character uploads in this skill are for non-human subjects only.
Prompt augmentation
Reformat prompts into a structured, production-oriented spec. Only make implicit details explicit; do not invent new creative requirements.
Template (include only relevant lines):
Use case: <where the clip will be used>
Primary request: <user's main prompt>
Scene/background: <location, time of day, atmosphere>
Subject: <main subject>
Action: <single clear action>
Camera: <shot type, angle, motion>
Lighting/mood: <lighting + mood>
Color palette: <3-5 color anchors>
Style/format: <film/animation/format cues>
Timing/beats: <counts or beats>
Audio: <ambient cue / music / voiceover if requested>
Text (verbatim): "<exact text>"
Dialogue:
<dialogue>
- Speaker: "Short line."
</dialogue>
Constraints: <must keep/must avoid>
Avoid: <negative constraints>
Augmentation rules:
- Keep it short; add only details the user already implied or provided elsewhere.
- For edits, explicitly list invariants ("same shot, change only X").
- For character-based shots, mention the character name verbatim in the prompt.
- If any critical detail is missing and blocks success, ask a question; otherwise proceed.
- If you pass a structured prompt file to the CLI, add
--no-augment to avoid the tool re-wrapping it.
Examples
Generation example (single shot)
Use case: product teaser
Primary request: a close-up of a matte black camera on a pedestal
Action: slow 30-degree orbit over 4 seconds
Camera: 85mm, shallow depth of field, gentle handheld drift
Lighting/mood: soft key light, subtle rim, premium studio feel
Constraints: no logos, no text
Edit example (invariants)
Primary request: same shot and framing, switch palette to teal/sand/rust with warmer backlight
Constraints: keep the subject and camera move unchanged
Character consistency example
Primary request: Mossy, a moss-covered teapot mascot, hurries through a lantern-lit market at dusk
Camera: cinematic tracking shot, 35mm, shoulder height
Lighting/mood: warm dusk practicals, soft haze
Constraints: keep Mossy’s silhouette and moss texture consistent across the shot
Prompting best practices (short list)
- One main action + one camera move per shot.
- Use counts or beats for timing ("two steps, pause, turn").
- Keep text short and the camera locked-off for UI or on-screen text.
- Add a brief avoid line when artifacts appear (flicker, jitter, fast motion).
- Shorter prompts are more creative; longer prompts are more controlled.
- Put dialogue in a dedicated block; keep lines short for 4-8s clips.
- Mention character names verbatim when using uploaded character IDs.
- State invariants explicitly for edits (same shot, same camera move).
- Prefer
edit for targeted changes and extend for timeline continuation.
- Iterate with single-change follow-ups to preserve continuity.
Guidance by asset type
Use these modules when the request is for a specific artifact. They provide targeted templates and defaults.
- Cinematic shots:
references/cinematic-shots.md
- Social ads:
references/social-ads.md
CLI + environment notes
- CLI commands + examples:
references/cli.md
- API parameter quick reference:
references/video-api.md
- Prompting guidance:
references/prompting.md
- Sample prompts:
references/sample-prompts.md
- Troubleshooting:
references/troubleshooting.md
- Network/sandbox tips:
references/codex-network.md
Reference map
references/cli.md: how to run create/edit/extend/create-character/poll/download/local-queue flows via scripts/sora.py.
references/video-api.md: API-level knobs (models, sizes, duration, characters, edits, extensions, official Batch API).
references/prompting.md: prompt structure, character continuity, editing, and extension guidance.
references/sample-prompts.md: copy/paste prompt recipes (examples only; no extra theory).
references/cinematic-shots.md: templates for filmic shots.
references/social-ads.md: templates for short social ad beats.
references/troubleshooting.md: common errors and fixes.
references/codex-network.md: network/approval troubleshooting.
1---2name: sora3description: 'Use when the user asks to generate, edit, extend, poll, list, download,4 or delete Sora videos, create reusable non-human Sora character references, or run5 local multi-video queues via the bundled CLI (`scripts/sora.py`); includes requests6 like: (i) generate AI video, (ii) edit this Sora clip, (ii...'7risk: safe8source: community9license: MIT10metadata:11 source: https://skillmd.com/skills/jantoniofc/sora12---1314# Sora Video Generation Skill1516Creates or manages Sora video jobs for the current project (product demos, marketing spots, cinematic shots, social clips, UI mocks). Defaults to `sora-2` with structured prompt augmentation and prefers the bundled CLI for deterministic runs. Note: `$sora` is a skill tag in prompts, not a shell command.1718## When to use19- Generate a new video clip from a prompt20- Create a reusable character reference from a short non-human source clip21- Edit an existing generated video with a targeted prompt change22- Extend a completed video with a continuation prompt23- Poll status, list jobs, or download assets (video/thumbnail/spritesheet)24- Run a local multi-job queue now, or plan a true Batch API submission for offline rendering2526## Decision tree27- If the user has a short non-human reference clip they want to reuse across shots → `create-character`28- If the user has a completed video and wants the next beat/continuation → `extend`29- If the user has a completed video and wants a targeted change while preserving the shot → `edit`30- If the user has a video id and wants status or assets → `status`, `poll`, or `download`31- If the user needs many renders immediately inside Codex → `create-batch` (local fan-out, not the Batch API)32- If the user needs many renders for offline processing or a studio pipeline → use the official Batch API flow described in `references/video-api.md`33- Otherwise → `create` (or `create-and-poll` if they need a ready asset in one step)3435## Workflow361. Decide intent: create vs create-character vs edit vs extend vs status/download vs local queue vs official Batch API.372. Collect inputs: prompt, model, size, seconds, any image reference, and any character IDs.383. Prefer CLI augmentation flags (`--use-case`, `--scene`, `--camera`, etc.) instead of hand-writing a long structured prompt. If you already have a structured prompt file, pass `--no-augment`.394. Run the bundled CLI (`scripts/sora.py`) with sensible defaults. For long prompts, prefer `--prompt-file` to avoid shell-escaping issues.405. For async jobs, poll until terminal status (or use `create-and-poll`).416. Download assets (video/thumbnail/spritesheet) and save them locally before URLs expire.427. If the user wants continuity across many shots, create character assets first, then reference them in later `create` calls.438. If the user wants to iterate on a completed shot, prefer `edit`; if they want the shot to continue in time, prefer `extend`.449. Use one targeted change per iteration.4546## Authentication47- `OPENAI_API_KEY` must be set for live API calls.4849If the key is missing, give the user these steps:501. Create an API key in the OpenAI platform UI: https://platform.openai.com/api-keys512. Set `OPENAI_API_KEY` as an environment variable in their system.523. Offer to guide them through setting the environment variable for their OS/shell if needed.53- Never ask the user to paste the full key in chat. Ask them to set it locally and confirm when ready.5455## Defaults & rules56- Default model: `sora-2` (use `sora-2-pro` for higher fidelity).57- Default size: `1280x720`.58- Default seconds: `4` (allowed: `"4"`, `"8"`, `"12"`, `"16"`, `"20"`).59- Always set size and seconds via API params; prose will not change them.60- `sora-2-pro` is required for `1920x1080` and `1080x1920`.61- Use up to two characters per generation.62- Use the OpenAI Python SDK (`openai` package). If high-level SDK helpers lag the latest Sora guide, use low-level `client.post/get/delete` inside the official SDK rather than standalone HTTP code.63- Require `OPENAI_API_KEY` before any live API call.64- If uv cache permissions fail, set `UV_CACHE_DIR=/tmp/uv-cache`.65- Input reference images must be jpg/png/webp and should match target size.66- JSON `input_reference` objects use either `file_id` or `image_url`; uploaded file paths use multipart.67- Download URLs expire after about 1 hour; copy assets to your own storage.68- Batch-generated videos remain downloadable for up to 24 hours after the batch completes.69- `create-batch` in `scripts/sora.py` is a local concurrent queue, not the official Batch API.70- Prefer the bundled CLI and **never modify** `scripts/sora.py` unless the user asks.71- Sora can generate audio; if a user requests voiceover/audio, specify it explicitly in the `Audio:` and `Dialogue:` lines and keep it short.7273## API limitations74- Models are limited to `sora-2` and `sora-2-pro`.75- API access to Sora models requires an organization-verified account.76- Duration must be set via the `seconds` parameter and currently supports `4`, `8`, `12`, `16`, and `20`.77- Character uploads currently work best with short `2`-`4` second non-human MP4s in `16:9` or `9:16`, at `720p`-`1080p`.78- Extensions can add up to `20` seconds each, up to six times per source video, for a maximum total length of `120` seconds.79- Extensions currently do not support characters or image references.80- This skill supports editing existing generated videos by ID.81- The official Batch API currently supports `POST /v1/videos` only, with JSON bodies rather than multipart uploads.82- Output sizes are limited by model (see `references/video-api.md` for the supported sizes).83- Video creation is async; you must poll for completion before downloading.84- Rate limits apply by usage tier (do not list specific limits).85- Content restrictions are enforced by the API (see Guardrails below).8687## Guardrails (must enforce)88- Only content suitable for audiences under 18.89- No copyrighted characters or copyrighted music.90- No real people (including public figures).91- Input images with human faces are rejected.92- Character uploads in this skill are for non-human subjects only.9394## Prompt augmentation95Reformat prompts into a structured, production-oriented spec. Only make implicit details explicit; do not invent new creative requirements.9697Template (include only relevant lines):98```99Use case: <where the clip will be used>100Primary request: <user's main prompt>101Scene/background: <location, time of day, atmosphere>102Subject: <main subject>103Action: <single clear action>104Camera: <shot type, angle, motion>105Lighting/mood: <lighting + mood>106Color palette: <3-5 color anchors>107Style/format: <film/animation/format cues>108Timing/beats: <counts or beats>109Audio: <ambient cue / music / voiceover if requested>110Text (verbatim): "<exact text>"111Dialogue:112<dialogue>113- Speaker: "Short line."114</dialogue>115Constraints: <must keep/must avoid>116Avoid: <negative constraints>117```118119Augmentation rules:120- Keep it short; add only details the user already implied or provided elsewhere.121- For edits, explicitly list invariants ("same shot, change only X").122- For character-based shots, mention the character name verbatim in the prompt.123- If any critical detail is missing and blocks success, ask a question; otherwise proceed.124- If you pass a structured prompt file to the CLI, add `--no-augment` to avoid the tool re-wrapping it.125126## Examples127128### Generation example (single shot)129```130Use case: product teaser131Primary request: a close-up of a matte black camera on a pedestal132Action: slow 30-degree orbit over 4 seconds133Camera: 85mm, shallow depth of field, gentle handheld drift134Lighting/mood: soft key light, subtle rim, premium studio feel135Constraints: no logos, no text136```137138### Edit example (invariants)139```140Primary request: same shot and framing, switch palette to teal/sand/rust with warmer backlight141Constraints: keep the subject and camera move unchanged142```143144### Character consistency example145```146Primary request: Mossy, a moss-covered teapot mascot, hurries through a lantern-lit market at dusk147Camera: cinematic tracking shot, 35mm, shoulder height148Lighting/mood: warm dusk practicals, soft haze149Constraints: keep Mossy’s silhouette and moss texture consistent across the shot150```151152## Prompting best practices (short list)153- One main action + one camera move per shot.154- Use counts or beats for timing ("two steps, pause, turn").155- Keep text short and the camera locked-off for UI or on-screen text.156- Add a brief avoid line when artifacts appear (flicker, jitter, fast motion).157- Shorter prompts are more creative; longer prompts are more controlled.158- Put dialogue in a dedicated block; keep lines short for 4-8s clips.159- Mention character names verbatim when using uploaded character IDs.160- State invariants explicitly for edits (same shot, same camera move).161- Prefer `edit` for targeted changes and `extend` for timeline continuation.162- Iterate with single-change follow-ups to preserve continuity.163164## Guidance by asset type165Use these modules when the request is for a specific artifact. They provide targeted templates and defaults.166- Cinematic shots: `references/cinematic-shots.md`167- Social ads: `references/social-ads.md`168169## CLI + environment notes170- CLI commands + examples: `references/cli.md`171- API parameter quick reference: `references/video-api.md`172- Prompting guidance: `references/prompting.md`173- Sample prompts: `references/sample-prompts.md`174- Troubleshooting: `references/troubleshooting.md`175- Network/sandbox tips: `references/codex-network.md`176177## Reference map178- **`references/cli.md`**: how to run create/edit/extend/create-character/poll/download/local-queue flows via `scripts/sora.py`.179- **`references/video-api.md`**: API-level knobs (models, sizes, duration, characters, edits, extensions, official Batch API).180- **`references/prompting.md`**: prompt structure, character continuity, editing, and extension guidance.181- **`references/sample-prompts.md`**: copy/paste prompt recipes (examples only; no extra theory).182- **`references/cinematic-shots.md`**: templates for filmic shots.183- **`references/social-ads.md`**: templates for short social ad beats.184- **`references/troubleshooting.md`**: common errors and fixes.185- **`references/codex-network.md`**: network/approval troubleshooting.