Loading...
Loading...
Generate videos using Seedance models. Invoke when user wants to create videos from text prompts, images, or reference materials.
npx skill4agent add bytedance/agentkit-samples byted-seedance-video-generateARK_API_KEYMODEL_VIDEO_API_KEYMODEL_AGENT_API_KEYMODEL_VIDEO_API_BASEMODEL_VIDEO_NAMEasync def video_generate(
params: list,
batch_size: int = 10,
max_wait_seconds: int = 1200,
model_name: str = None,
) -> Dict:video_namepromptfirst_framelast_framereference_imagesreference_videosreference_audiosratiodurationresolutionframescamera_fixedseedwatermarkgenerate_audiotools[{"type": "web_search"}]{
"status": "success" | "partial_success" | "error",
"success_list": [{"video_name": "video_url"}],
"error_list": ["video_name"],
"error_details": [{"video_name": "...", "error": {...}}],
"pending_list": [{"video_name": "...", "task_id": "cgt-xxx", ...}]
}<video src="https://example.com/video1.mp4" width="640" controls>video-1</video>
<video src="https://example.com/video2.mp4" width="640" controls>video-2</video># Text-to-Video
python scripts/video_generate.py -p "小猫骑着滑板穿过公园" -n cat_park -r 16:9 -d 5 --resolution 720p
# First Frame Guidance
python scripts/video_generate.py -p "小猫跳起来" -n cat_jump -f "https://example.com/cat.png" -r adaptive -d 5
# First + Last Frame Guidance
python scripts/video_generate.py -p "平滑过渡动画" -n transition \
-f "https://example.com/start.png" \
-l "https://example.com/end.png" \
-d 6
# Reference Images (style/content guidance)
python scripts/video_generate.py -p "[图1]戴着眼镜的男生和[图2]柯基小狗坐在草坪上" -n styled \
--ref-images "https://example.com/boy.png" "https://example.com/dog.png" \
-r 16:9 -d 5
# Multimodal Reference (video + audio)
python scripts/video_generate.py -p "将视频中的人物换成[图1]中的男孩" -n multimodal \
--ref-images "https://example.com/boy.png" \
--ref-videos "https://example.com/source.mp4" \
--ref-audios "https://example.com/voice.wav" \
-d 5
# With Audio Generation (Seedance 1.5 only)
python scripts/video_generate.py -p "女孩抱着狐狸,可以听到风声和树叶沙沙声" -n with_audio \
-f "https://example.com/girl_fox.png" \
--generate-audio \
-m doubao-seedance-1-5-pro-251215 \
-d 6 --resolution 1080p
# Query task status
python scripts/video_generate.py -q "cgt-20260222165751-wsnw8"
# Use specific model
python scripts/video_generate.py -p "A futuristic city" -m doubao-seedance-1-5-pro-251215
# No watermark
python scripts/video_generate.py -p "A beautiful landscape" --no-watermark| Option | Short | Description |
|---|---|---|
| | Text description of the video (required) |
| | Video name identifier (default: video) |
| | Model name (default: doubao-seedance-1-0-pro-250528) |
| | Aspect ratio (default: 16:9) |
| | Video duration in seconds (2-12) |
| Video resolution: 480p, 720p, 1080p | |
| | First frame image URL |
| | Last frame image URL |
| Reference image URLs (space-separated, 1-4 images) | |
| Reference video URLs (space-separated, 0-3 videos) | |
| Reference audio URLs (space-separated, 0-3 audios) | |
| Generate audio (Seedance 1.5 only) | |
| Random seed for reproducibility | |
| Disable watermark | |
| | Max wait time in seconds (default: 1200) |
| | Query task status by task_id |
ModelNotOpendoubao-seedance-1-5-pro-251215doubao-seedance-1-0-pro-250528ARK_API_KEYMODEL_VIDEO_API_KEYMODEL_AGENT_API_KEY--query-task