$npx -y skills add QinghongLin/data2story-skill --skill openrouter-text2videoGenerate videos via OpenRouter using ByteDance Seedance 2.0.
| 1 | # openrouter-text2video |
| 2 | |
| 3 | Text → video via OpenRouter. Default model: `bytedance/seedance-2.0`. |
| 4 | |
| 5 | Uses the async video-generation endpoint: submit job → poll → download. |
| 6 | |
| 7 | ## Usage |
| 8 | |
| 9 | Resolve `TOOL_DIR` = the directory containing this `SKILL.md`. Commands below use `TOOL_DIR` as a symbolic placeholder; replace it with the resolved, quoted path before running Bash. |
| 10 | |
| 11 | ```bash |
| 12 | export OPENROUTER_API_KEY=sk-or-v1-... |
| 13 | |
| 14 | python3 TOOL_DIR/scripts/generate_video.py \ |
| 15 | --prompt "A slow dolly push through a retro-futuristic arcade, neon signs reflecting in a puddle" \ |
| 16 | --duration 5 \ |
| 17 | --aspect-ratio 16:9 \ |
| 18 | --resolution 720p \ |
| 19 | --download PROJECT_DIR/assets/hero.mp4 |
| 20 | ``` |
| 21 | |
| 22 | ## Flags |
| 23 | |
| 24 | | Flag | Default | Description | |
| 25 | |---|---|---| |
| 26 | | `--prompt` | required | Text prompt | |
| 27 | | `--download` | required | Output MP4 path | |
| 28 | | `--model` | `bytedance/seedance-2.0` | Any OpenRouter video model | |
| 29 | | `--duration` | `5` | Seconds | |
| 30 | | `--aspect-ratio` | `16:9` | `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`, `9:21` | |
| 31 | | `--resolution` | `720p` | Model-dependent (e.g. `480p`, `720p`, `1080p`) | |
| 32 | | `--generate-audio` | off | Generate audio with video (if model supports) | |
| 33 | | `--poll-interval` | `5` | Seconds between polls | |
| 34 | | `--max-wait` | `600` | Max total wait time | |
| 35 | |
| 36 | ## Flow |
| 37 | |
| 38 | 1. `POST /api/v1/videos` → returns `{id, polling_url, status: "pending"}` |
| 39 | 2. `GET /api/v1/videos/{id}` every 5s until `status == "completed"` |
| 40 | 3. `GET /api/v1/videos/{id}/content` → raw MP4 bytes |
| 41 | |
| 42 | ## Pricing |
| 43 | |
| 44 | Seedance 2.0: ~$7/M tokens with `(height × width × duration × 24) / 1024` token formula. A 5-second 720p 16:9 clip ≈ 145k tokens ≈ $1. |
| 45 | |
| 46 | ## Notes |
| 47 | |
| 48 | - Supports text-to-video, image-to-video (first/last frame control via `frame_images`), and reference-to-video. |
| 49 | - This script only wires text-to-video. Extend the body to add `frame_images` or `input_references` for advanced modes. |