使用 SkillBoss API Hub 生成 AI 视频。适用于:(1) 根据文本提示生成视频;(2) 根据图片(首帧)生成视频。
Generate AI videos via SkillBoss API Hub's unified video generation capability.
The user must set the SKILLBOSS_API_KEY environment variable. You can set it by running:
bash
export SKILLBOSS_API_KEY="your-api-key-here"
Base URL: https://api.skillbossai.com/v1/pilot
SkillBoss API Hub automatically routes to the optimal video generation model. Model hints are passed via the inputs field and honored when available.
ModelModel HintCapabilitiesSeedance 1.5 Prodoubao-seedance-1-5-pro-251215Text-to-video, Image-to-video (first frame, first+last frame), Audio support, Draft modeSeedance 1.0 Prodoubao-seedance-1-0-pro-250428Text-to-video, Image-to-video (first frame, first+last frame)Seedance 1.0 Pro Fastdoubao-seedance-1-0-pro-fast-250528Text-to-video, Image-to-video (first frame only)Seedance 1.0 Lite T2Vdoubao-seedance-1-0-lite-t2v-250219Text-to-video onlySeedance 1.0 Lite I2Vdoubao-seedance-1-0-lite-i2v-250219Image-to-video (first frame, first+last frame, reference images 1-4)
Default model: doubao-seedance-1-5-pro-251215 (latest, supports audio)
A Python CLI tool is provided at ~/.claude/skills/seedance-video/seedance.py for robust execution with proper error handling and local image base64 conversion. Prefer using this tool over raw curl commands.
bash
# Text-to-video (create + download)
python3 ~/.claude/skills/seedance-video/seedance.py create --prompt "小猫对着镜头打哈欠" --download ~/Desktop
# Image-to-video from local file
python3 ~/.claude/skills/seedance-video/seedance.py create --prompt "人物缓缓转头微笑" --image /path/to/photo.jpg --download ~/Desktop
# Image-to-video from URL
python3 ~/.claude/skills/seedance-video/seedance.py create --prompt "风景画面缓缓推进" --image "https://example.com/image.jpg" --download ~/Desktop
# First + last frame
python3 ~/.claude/skills/seedance-video/seedance.py create --prompt "花朵从含苞到盛开" --image first.jpg --last-frame last.jpg --download ~/Desktop
# Reference images (Lite I2V)
python3 ~/.claude/skills/seedance-video/seedance.py create --prompt "[图1]的人物在跳舞" --ref-images ref1.jpg ref2.jpg --model doubao-seedance-1-0-lite-i2v-250219 --download ~/Desktop
# Custom parameters
python3 ~/.claude/skills/seedance-video/seedance.py create --prompt "城市夜景延时摄影" --ratio 21:9 --duration 8 --resolution 1080p --generate-audio false --download ~/Desktop
# Draft mode (cheaper preview)
python3 ~/.claude/skills/seedance-video/seedance.py create --prompt "海浪拍打沙滩" --draft true --download ~/Desktop
# Generate final video from draft
python3 ~/.claude/skills/seedance-video/seedance.py create --draft-task-id <DRAFT_TASK_ID> --resolution 720p --download ~/Desktop
bash
[ -z "$SKILLBOSS_API_KEY" ] && echo "Error: SKILLBOSS_API_KEY not set" && exit 1
RESULT=$(curl -s -X POST "https://api.skillbossai.com/v1/pilot" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SKILLBOSS_API_KEY" \
-d '{
"type": "video",
"inputs": {
"prompt": "YOUR_PROMPT_HERE",
"ratio": "16:9",
"duration": 5,
"resolution": "720p",
"generate_audio": true
},
"prefer": "balanced"
}')
VIDEO_URL=$(echo "$RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin)['result']['video_url'])")
echo "Video URL: $VIDEO_URL"
bash
[ -z "$SKILLBOSS_API_KEY" ] && echo "Error: SKILLBOSS_API_KEY not set" && exit 1
RESULT=$(curl -s -X POST "https://api.skillbossai.com/v1/pilot" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SKILLBOSS_API_KEY" \
-d '{
"type": "video",
"inputs": {
"prompt": "YOUR_PROMPT_HERE",
"image": "IMAGE_URL_HERE",
"ratio": "adaptive",
"duration": 5,
"resolution": "720p",
"generate_audio": true
},
"prefer": "balanced"
}')
VIDEO_URL=$(echo "$RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin)['result']['video_url'])")
echo "Video URL: $VIDEO_URL"
bash
[ -z "$SKILLBOSS_API_KEY" ] && echo "Error: SKILLBOSS_API_KEY not set" && exit 1
IMG_PATH="/path/to/image.png"
IMG_EXT="${IMG_PATH##*.}"
IMG_EXT_LOWER=$(echo "$IMG_EXT" | tr '[:upper:]' '[:lower:]')
IMG_BASE64=$(base64 < "$IMG_PATH" | tr -d '\n')
IMG_DATA_URL="data:image/${IMG_EXT_LOWER};base64,${IMG_BASE64}"
RESULT=$(curl -s -X POST "https://api.skillbossai.com/v1/pilot" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SKILLBOSS_API_KEY" \
-d "{
\"type\": \"video\",
\"inputs\": {
\"prompt\": \"YOUR_PROMPT_HERE\",
\"image\": \"${IMG_DATA_URL}\",
\"ratio\": \"adaptive\",
\"duration\": 5,
\"resolution\": \"720p\",
\"generate_audio\": true
},
\"prefer\": \"balanced\"
}")
VIDEO_URL=$(echo "$RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin)['result']['video_url'])")
echo "Video URL: $VIDEO_URL"
bash
[ -z "$SKILLBOSS_API_KEY" ] && echo "Error: SKILLBOSS_API_KEY not set" && exit 1
RESULT=$(curl -s -X POST "https://api.skillbossai.com/v1/pilot" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SKILLBOSS_API_KEY" \
-d '{
"type": "video",
"inputs": {
"prompt": "YOUR_PROMPT_HERE",
"image": "FIRST_FRAME_IMAGE_URL",
"last_frame": "LAST_FRAME_IMAGE_URL",
"ratio": "adaptive",
"duration": 5,
"resolution": "720p",
"generate_audio": true
},
"prefer": "balanced"
}')
VIDEO_URL=$(echo "$RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin)['result']['video_url'])")
echo "Video URL: $VIDEO_URL"
bash
[ -z "$SKILLBOSS_API_KEY" ] && echo "Error: SKILLBOSS_API_KEY not set" && exit 1
RESULT=$(curl -s -X POST "https://api.skillbossai.com/v1/pilot" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SKILLBOSS_API_KEY" \
-d '{
"type": "video",
"inputs": {
"prompt": "[图1]的人物在跳舞",
"ref_images": ["REF_IMAGE_URL_1"],
"ratio": "16:9",
"duration": 5,
"resolution": "720p"
},
"prefer": "balanced"
}')
VIDEO_URL=$(echo "$RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin)['result']['video_url'])")
echo "Video URL: $VIDEO_URL"
bash
OUTPUT_PATH="$HOME/Desktop/seedance_video_$(date +%Y%m%d_%H%M%S).mp4"
curl -s -o "$OUTPUT_PATH" "$VIDEO_URL"
echo "Video saved to: $OUTPUT_PATH"
open "$OUTPUT_PATH"
ParameterTypeDefaultDescriptionmodelstringdoubao-seedance-1-5-pro-251215Model hint to pass to SkillBoss API Hubratiostring16:9 (text2vid) / adaptive (img2vid)Aspect ratio: 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive``durationinteger5Video duration in seconds (4-12 for 1.5 Pro, 2-12 for others). Set -1 for auto (1.5 Pro only)resolutionstring720pResolution: 480p, 720p, 1080p``seedinteger-1Random seed for reproducibility. -1 = randomcamera_fixedbooleanfalseFix camera positionwatermarkbooleanfalseAdd watermark to videogenerate_audiobooleantrueGenerate synchronized audio (Seedance 1.5 Pro only)draftbooleanfalseGenerate draft/preview video at lower cost (Seedance 1.5 Pro only, forces 480p)return_last_framebooleanfalseReturn last frame image URL (for chaining consecutive videos)service_tierstringdefault``default (online) or flex (offline, 50% cheaper, slower)
详见 how_to_send_video_via_feishu_app.md
SKILLBOSS_API_KEY is set before making API calls: [ -z "$SKILLBOSS_API_KEY" ] && echo "Error: SKILLBOSS_API_KEY not set" && exit 1doubao-seedance-1-5-pro-251215) unless user requests a specific model.