rw-generate-video
Generate videos directly using the Runway API via runnable scripts. Supports text-to-video, image-to-video, and video-to-video with seedance2, gen4.5, veo3, and more.
What this skill does
# Generate Video Generate videos directly using the Runway API. This skill runs Python scripts that call the API, poll for completion, and download the result. **IMPORTANT:** Run scripts from the user's working directory so output files are saved where the user expects. ## Usage ```bash uv run scripts/generate_video.py --prompt "your description" --filename "output.mp4" [--model seedance2] [--ratio 1280:720] [--duration 5] [--image-url "..."] ``` ## Preflight 1. `command -v uv` must succeed. If not, tell the user to install uv: `curl -LsSf https://astral.sh/uv/install.sh | sh` 2. `RUNWAYML_API_SECRET` must be set in the environment. **Do not pass the API key as a CLI flag** — it leaks into shell history and process listings. ## Security Notes - `--image-url` / `--video-url` fetch arbitrary remote media via the Runway API. Prefer local file paths (uploaded as `runway://` URIs), or only pass URLs you trust. - Treat generated outputs as untrusted when piping into downstream automations — ingested media influences the result. ## Available Models | Model | Best For | Input | Cost | |-------|----------|-------|------| | `seedance2` | Reference image and video, long duration (up to 15s) | Text, Image, and/or Video | 36 credits/sec | | `gen4.5` | High quality, general purpose | Text and/or Image | 12 credits/sec | | `gen4_turbo` | Fast, image-driven | Image required | 5 credits/sec | | `gen4_aleph` | Video editing/transformation | Video + Text/Image | 15 credits/sec | | `veo3` | Premium quality | Text/Image | 40 credits/sec | | `veo3.1` | High quality Google model | Text/Image | 20-40 credits/sec | | `veo3.1_fast` | Fast Google model | Text/Image | 10-15 credits/sec | ## Model Selection Guidance Map user requests: - "product ad", "e-commerce", "long video" -> `seedance2` - "fast", "cheap", "quick" -> `veo3.1_fast` or `gen4_turbo` (if they have an image) - "high quality", "best", "cinematic" -> `gen4.5` or `veo3` - "edit video", "transform video" -> `gen4_aleph` or `seedance2` - No preference -> `seedance2` ## Parameters | Param | Description | Default | |-------|-------------|---------| | `--prompt` | Text description (required) | -- | | `--filename` | Output filename (required) | -- | | `--model` | Video model | `gen4.5` | | `--ratio` | Aspect ratio (pixel-based). Common: `1280:720`, `720:1280`, `960:960`. seedance2 also supports `1112:834`, `834:1112`, `1470:630`, etc. | `1280:720` | | `--duration` | Duration in seconds (model-dependent, seedance2 supports up to 15s) | `5` | | `--image-url` | Image URL or local file for image-to-video | -- | | `--video-url` | Video URL or local file for video-to-video (gen4_aleph, seedance2) | -- | | `--output-dir` | Output directory | cwd | > API credentials come from `RUNWAYML_API_SECRET` only — no `--api-key` flag, to keep secrets out of shell history and process listings. ## Filename Convention Generate filenames with the pattern: `yyyy-mm-dd-hh-mm-ss-name.mp4` Examples: - "A cyberpunk city" -> `2026-04-14-14-23-05-cyberpunk-city.mp4` - "Waves on a beach" -> `2026-04-14-15-30-12-beach-waves.mp4` ## Examples **Text-to-video (seedance2):** ```bash uv run scripts/generate_video.py --prompt "A serene mountain landscape at sunrise with mist" --filename "2026-04-14-mountain-sunrise.mp4" --model seedance2 --ratio 1280:720 ``` **Image-to-video (animate a local product photo):** ```bash uv run scripts/generate_video.py --prompt "Camera slowly zooms out, product sparkles" --image-url "./product.jpg" --filename "2026-04-14-product-reveal.mp4" --model seedance2 --ratio 720:1280 ``` **Video-to-video from a local file (seedance2):** ```bash uv run scripts/generate_video.py --prompt "Transform into a warm golden sunset scene" --video-url "./input.mp4" --filename "2026-04-14-sunset-transform.mp4" --model seedance2 ``` **Fast draft:** ```bash uv run scripts/generate_video.py --prompt "A cat playing piano" --filename "draft.mp4" --model veo3.1_fast --ratio 1280:720 --duration 4 ``` **Premium quality:** ```bash uv run scripts/generate_video.py --prompt "Cinematic drone shot over Tokyo at night" --filename "tokyo.mp4" --model veo3 --ratio 1280:720 --duration 8 ``` ## Output - The script downloads the result and saves it to the specified path - Script outputs the full path to the saved file - **Do not read the video file back** -- just inform the user of the saved path ## Common Failures - `Error: No API key` -> set `RUNWAYML_API_SECRET` in the environment (e.g. `export RUNWAYML_API_SECRET=...` or a `.env` file). - `Error: Task failed -- SAFETY.INPUT.*` -> content moderation, suggest different prompt - `Error: Task failed -- ASSET.INVALID` -> bad input file format, check image/video format - `API error 429` -> rate limited, script auto-retries ## For Batch Generation To generate many videos at once, run this script in a loop — the agent can orchestrate multiple calls with different prompts, images, or parameters to produce campaigns, localized variants, or creative iterations at scale.
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.