使用 OpenAI 的 Sora 2 API 生成、编辑、扩展和管理 AI 视频。包括适用于产品演示、社交广告、品牌宣传片等的营销级提示模板。
AI video generation skill for Stomme AI customers using OpenAI's Sora 2 API. Wraps a production-grade Python CLI with marketing-focused prompt templates for business use cases.
Customers need their own OPENAI_API_KEY from OpenAI's platform:
export OPENAI_API_KEY="sk-..."Important: A ChatGPT Pro/Plus subscription does NOT provide API access to Sora. You need a separate API key with pay-per-use billing from platform.openai.com.
The CLI requires Python 3.10+ and uses uv for dependency management (auto-installs the openai SDK):
bash
# Install uv if not present
curl -LsSf https://astral.sh/uv/install.sh | sh
ModelDurationApproximate Costsora-24s~$0.10sora-28s~$0.20sora-212-16s~$0.30sora-220s~$0.40sora-2-pro4s~$0.25sora-2-pro8s~$0.40sora-2-pro12-16s~$0.50sora-2-pro20s~$0.60
Costs are per video generation attempt. Failed or cancelled jobs are not billed. Prices are approximate and may change — check OpenAI's pricing page for current rates.
templates/product-demo.md template + createtemplates/social-ads.md template + create (4-8s)templates/brand-spots.md template + create or create-and-polltemplates/launch-teaser.md template + create-and-pollcreate-character first, then create with character IDsedit (one targeted change per iteration)extend (continue timeline)create-batch with JSONL inputstatus or polldownload (video/thumbnail/spritesheet)templates/ matching the use case (or write a custom prompt).scripts/sora.py with appropriate flags.create-and-poll).edit (targeted changes) or extend (timeline continuation).Set the CLI path:
bash
export SORA_CLI="<path-to-skill>/scripts/sora.py"
bash
uv run --with openai python "$SORA_CLI" create \
--prompt "Close-up of a premium smartwatch on marble surface" \
--model sora-2 \
--size 1280x720 \
--seconds 8
bash
uv run --with openai python "$SORA_CLI" create-and-poll \
--prompt "Product hero shot of wireless earbuds" \
--model sora-2-pro \
--size 1920x1080 \
--seconds 4 \
--download \
--out hero.mp4
bash
python "$SORA_CLI" create --prompt "Test prompt" --dry-run
Full CLI reference: references/cli.md
OPENAI_API_KEY must be set for live API calls.api.videos.* scopes).sora-2 (fast, flexible)sora-2-pro (higher fidelity, required for 1080p)1280x7204 secondsModelSizessora-21280x720, 720x1280sora-2-pro1280x720, 720x1280, 1024x1792, 1792x1024, 1920x1080, 1080x1920
The CLI automatically reformats prompts into a structured production spec. Use CLI flags instead of writing long structured prompts:
bash
uv run --with openai python "$SORA_CLI" create \
--prompt "Premium headphones on display" \
--use-case "product teaser" \
--scene "dark studio, soft haze" \
--camera "85mm, slow orbit" \
--lighting "soft key, gentle rim" \
--seconds 8
If your prompt is already structured, add --no-augment.
Ready-to-use prompt templates for common business video needs:
TemplateFileBest ForProduct Demostemplates/product-demo.mdProduct launches, feature showcasesSocial Adstemplates/social-ads.mdInstagram, TikTok, LinkedIn clipsBrand Spotstemplates/brand-spots.mdBrand identity, company cultureLaunch Teaserstemplates/launch-teaser.mdPre-launch hype, coming soon
sora-2 and sora-2-pro onlyseconds parameter (4, 8, 12, 16, 20)references/cli.md — Full CLI command referencereferences/video-api.md — API parameters and endpointsreferences/prompting.md — Prompt engineering best practicesreferences/troubleshooting.md — Common errors and fixestemplates/product-demo.md — Product demo prompt templatestemplates/social-ads.md — Social ad prompt templatestemplates/brand-spots.md — Brand identity spot templatestemplates/launch-teaser.md — Launch teaser templates