$npx -y skills add freestylefly/canghe-skills --skill seedance-video-generation-1.0.3Generate AI videos using ByteDance Seedance. Use when the user wants to: (1) generate videos from text prompts, (2) generate videos from images (first frame, first+last frame, reference images), or (3) query/manage video generation tasks. Supports Seedance 1.5 Pro (with audio), 1
| 1 | # Seedance Video Generation |
| 2 | |
| 3 | Generate AI videos using ByteDance Seedance models via the Volcengine Ark API. |
| 4 | |
| 5 | ## Prerequisites |
| 6 | |
| 7 | The user must set the `ARK_API_KEY` environment variable. You can set it by running: |
| 8 | |
| 9 | ```bash |
| 10 | export ARK_API_KEY="your-api-key-here" |
| 11 | ``` |
| 12 | |
| 13 | **Base URL**: `https://ark.cn-beijing.volces.com/api/v3` |
| 14 | |
| 15 | ## Supported Models |
| 16 | |
| 17 | | Model | Model ID | Capabilities | |
| 18 | |-------|----------|-------------| |
| 19 | | Seedance 1.5 Pro | `doubao-seedance-1-5-pro-251215` | Text-to-video, Image-to-video (first frame, first+last frame), Audio support, Draft mode | |
| 20 | | Seedance 1.0 Pro | `doubao-seedance-1-0-pro-250428` | Text-to-video, Image-to-video (first frame, first+last frame) | |
| 21 | | Seedance 1.0 Pro Fast | `doubao-seedance-1-0-pro-fast-250528` | Text-to-video, Image-to-video (first frame only) | |
| 22 | | Seedance 1.0 Lite T2V | `doubao-seedance-1-0-lite-t2v-250219` | Text-to-video only | |
| 23 | | Seedance 1.0 Lite I2V | `doubao-seedance-1-0-lite-i2v-250219` | Image-to-video (first frame, first+last frame, reference images 1-4) | |
| 24 | |
| 25 | **Default model**: `doubao-seedance-1-5-pro-251215` (latest, supports audio) |
| 26 | |
| 27 | ## Execution (Recommended: Python CLI Tool) |
| 28 | |
| 29 | A Python CLI tool is provided at `~/.claude/skills/seedance-video/seedance.py` for robust execution with proper error handling, automatic retries, and local image base64 conversion. **Prefer using this tool over raw curl commands.** |
| 30 | |
| 31 | ### Quick Examples with Python CLI |
| 32 | |
| 33 | ```bash |
| 34 | # Text-to-video (create + wait + download) |
| 35 | python3 ~/.claude/skills/seedance-video/seedance.py create --prompt "小猫对着镜头打哈欠" --wait --download ~/Desktop |
| 36 | |
| 37 | # Image-to-video from local file |
| 38 | python3 ~/.claude/skills/seedance-video/seedance.py create --prompt "人物缓缓转头微笑" --image /path/to/photo.jpg --wait --download ~/Desktop |
| 39 | |
| 40 | # Image-to-video from URL |
| 41 | python3 ~/.claude/skills/seedance-video/seedance.py create --prompt "风景画面缓缓推进" --image "https://example.com/image.jpg" --wait --download ~/Desktop |
| 42 | |
| 43 | # First + last frame |
| 44 | python3 ~/.claude/skills/seedance-video/seedance.py create --prompt "花朵从含苞到盛开" --image first.jpg --last-frame last.jpg --wait --download ~/Desktop |
| 45 | |
| 46 | # Reference images (Lite I2V) |
| 47 | python3 ~/.claude/skills/seedance-video/seedance.py create --prompt "[图1]的人物在跳舞" --ref-images ref1.jpg ref2.jpg --model doubao-seedance-1-0-lite-i2v-250219 --wait --download ~/Desktop |
| 48 | |
| 49 | # Custom parameters |
| 50 | python3 ~/.claude/skills/seedance-video/seedance.py create --prompt "城市夜景延时摄影" --ratio 21:9 --duration 8 --resolution 1080p --generate-audio false --wait --download ~/Desktop |
| 51 | |
| 52 | # Draft mode (cheaper preview) |
| 53 | python3 ~/.claude/skills/seedance-video/seedance.py create --prompt "海浪拍打沙滩" --draft true --wait --download ~/Desktop |
| 54 | |
| 55 | # Generate final video from draft |
| 56 | python3 ~/.claude/skills/seedance-video/seedance.py create --draft-task-id <DRAFT_TASK_ID> --resolution 720p --wait --download ~/Desktop |
| 57 | |
| 58 | # Query task status |
| 59 | python3 ~/.claude/skills/seedance-video/seedance.py status <TASK_ID> |
| 60 | |
| 61 | # Wait for an existing task |
| 62 | python3 ~/.claude/skills/seedance-video/seedance.py wait <TASK_ID> --download ~/Desktop |
| 63 | |
| 64 | # List tasks |
| 65 | python3 ~/.claude/skills/seedance-video/seedance.py list --status succeeded |
| 66 | |
| 67 | # Delete/cancel task |
| 68 | python3 ~/.claude/skills/seedance-video/seedance.py delete <TASK_ID> |
| 69 | ``` |
| 70 | |
| 71 | ## Alternative: Raw curl Commands |
| 72 | |
| 73 | ### Step 1: Create Video Generation Task |
| 74 | |
| 75 | Determine the generation mode based on user input, then call the API. |
| 76 | |
| 77 | #### Mode A: Text-to-Video |
| 78 | |
| 79 | ```bash |
| 80 | TASK_RESULT=$(curl -s -X POST "https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks" \ |
| 81 | -H "Content-Type: application/json" \ |
| 82 | -H "Authorization: Bearer $ARK_API_KEY" \ |
| 83 | -d '{ |
| 84 | "model": "doubao-seedance-1-5-pro-251215", |
| 85 | "content": [ |
| 86 | { |
| 87 | "type": "text", |
| 88 | "text": "YOUR_PROMPT_HERE" |
| 89 | } |
| 90 | ], |
| 91 | "ratio": "16:9", |
| 92 | "duration": 5, |
| 93 | "resolution": "720p", |
| 94 | "generate_audio": true |
| 95 | }') |
| 96 | |
| 97 | TASK_ID=$(echo "$TASK_RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])") |
| 98 | echo "Task created: $TASK_ID" |
| 99 | ``` |
| 100 | |
| 101 | #### Mode B: Image-to-Video (First Frame) |
| 102 | |
| 103 | The user provides one image as the first frame. The image can be a URL or local file path (convert to base64). |
| 104 | |
| 105 | **With image URL:** |
| 106 | ```bash |
| 107 | TASK_RESULT=$(curl -s -X POST "https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks" \ |
| 108 | -H "Content-Type: application/json" \ |
| 109 | -H "Authorization: Bearer $ARK_API_KEY" \ |
| 110 | -d '{ |
| 111 | "model": "doubao-seedance-1-5-pro-251215", |
| 112 | "content": [ |
| 113 | { |
| 114 | "type": "text", |
| 115 | "text": "YOUR_PROMPT_HERE" |
| 116 | }, |
| 117 | { |
| 118 | "type": "image_url", |
| 119 | "image_url": { "ur |