/byted-seedance-video-generate
Generate videos using Seedance models. Invoke when user wants to create videos from text prompts, images, or reference materials.
$ npx -y skills add bytedance/agentkit-samples --skill byted-seedance-video-generate --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/byted-seedance-video-generate
Context preview
The summary Claude sees to decide when to auto-load this skill.
Generate videos using Seedance models. Invoke when user wants to create videos from text prompts, images, or reference materials.
SKILL.md
byted-seedance-video-generate.SKILL.mdname: byted-seedance-video-generate
description: Generate videos using Seedance models. Invoke when user wants to create videos from text prompts, images, or reference materials.
version: 1.0.0
Video Generate Skill
This skill generates videos using Doubao Seedance 1.0/1.5 models.
Trigger Conditions
1. User wants to generate videos from text descriptions 2. User wants to create videos based on images (first/last frame) 3. User wants to create videos with reference materials (images, videos, audio) 4. User asks for video generation capabilities
Usage
Environment Variables
Before using this skill, ensure the following environment variables are set:
- `ARK_API_KEY` or `MODEL_VIDEO_API_KEY` or `MODEL_AGENT_API_KEY`: API key for the video generation service
- `MODEL_VIDEO_API_BASE`: API base URL (optional, has default)
- `MODEL_VIDEO_NAME`: Model name (optional, has default)
Function Signature
async def video_generate(
params: list,
batch_size: int = 10,
max_wait_seconds: int = 1200,
model_name: str = None,
) -> Dict:Parameters
params (list[dict])
A list of video generation requests. Each item is a dict with the following fields:
**Required per item:**
- `video_name` (str): Name/identifier of the output video file
- `prompt` (str): Text describing the video to generate. Supports Chinese and English.
**Optional per item - Input Materials:**
- `first_frame` (str): URL for the first frame image
- `last_frame` (str): URL for the last frame image
- `reference_images` (list[str]): 1-4 reference image URLs for style/content guidance
- `reference_videos` (list[str]): 0-3 reference video URLs (mp4/mov, 2-15s each, total ≤15s)
- `reference_audios` (list[str]): 0-3 reference audio URLs (mp3/wav, 2-15s each, total ≤15s)
**Optional per item - Video Output Parameters:**
- `ratio` (str): Aspect ratio. Options: "16:9" (default), "9:16", "4:3", "3:4", "1:1", "2:1", "21:9", "adaptive"
- `duration` (int): Video length in seconds. Range: 2-12s depending on model
- `resolution` (str): Video resolution. Options: "480p", "720p", "1080p"
- `frames` (int): Total frame count. Must be in [29, 289] and follow format 25 + 4n
- `camera_fixed` (bool): Lock camera movement. Default: false
- `seed` (int): Random seed for reproducibility. Range: [-1, 2^32-1]
- `watermark` (bool): Whether to add watermark. Default: false
- `generate_audio` (bool): Whether to generate audio. Only Seedance 1.5 supports this
- `tools` (list[dict]): Tool configuration, e.g., `[{"type": "web_search"}]`
Input Modes
1. **Text-to-Video**: Only provide prompt, no images/videos 2. **First Frame Guidance**: Provide first_frame for starting image 3. **First + Last Frame Guidance**: Provide both for transition video 4. **Reference Images**: Provide reference_images for style/content guidance 5. **Multimodal Reference**: Combine reference_images, reference_videos, reference_audios
Return Value
Script Return Info
The video_generate.py script will return these info:
{
"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", ...}]
}Based on the script return info, the final response returned to the user consists of a description of the video generation task and the video URL(s). You may download the video from the URL, but the video URL should still be provided to the user for viewing and downloading.
Note: the URL is the 'url' in the success_list of script return info. The URL must return in two ways:
Final Return Info
For OpenClaw
1. **First, save/download the generated video to an allowed directory**:
- Recommended: `~/.openclaw/workspace/`
2. **Use the `message tool` to send the video** with these parameters:
{
"action": "send",
"message": "Optional text description",
"media": "/root/.openclaw/workspace/generated-video.mp4"
}- The tool will automatically: read the local file, upload to the channel server as a web URL, and send as a video message
3. **Verify success**: Check that the tool returns `{"ok": true}` to confirm the video was sent successfully
4. **Normal Text** not message tool: After generation, show list of videos with Markdown format, for example:
<video src="https://example.com/video1.mp4" width="640" controls>video-1</video>
**Very important**: The video URL must be an **original online resource link** starting with `https://`, **not** a local video address you have downloaded.
For Normal
You should return three types of information: 1. File format, return the video file (if you have some other methods to send the video file) and the local path of the video, for example: local_path: /root/.openclaw/workspace/skills/video-generate/xxx.mp4 2. After generation, show list of videos with Markdown format, for example:
<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>
Code Implementation
See [scripts/video_generate.py](scripts/video_generate.py) for the full implementation.
Example Usage
# 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 -dRead more
name: byted-seedance-video-generate description: Generate videos using Seedance models. Invoke when user wants to create videos from text prompts, images, or reference materials. version: 1.0.0
Video Generate Skill
This skill generates videos using Doubao Seedance 1.0/1.5 models.
Trigger Conditions
1. User wants to generate videos from text descriptions 2. User wants to create videos based on images (first/last frame) 3. User wants to create videos with reference materials (images, videos, audio) 4. User asks for video generation capabilities
Usage
Environment Variables
Before using this skill, ensure the following environment variables are set:
- `ARK_API_KEY` or `MODEL_VIDEO_API_KEY` or `MODEL_AGENT_API_KEY`: API key for the video generation service
- `MODEL_VIDEO_API_BASE`: API base URL (optional, has default)
- `MODEL_VIDEO_NAME`: Model name (optional, has default)
Function Signature
async def video_generate(
params: list,
batch_size: int = 10,
max_wait_seconds: int = 1200,
model_name: str = None,
) -> Dict:Parameters
params (list[dict])
A list of video generation requests. Each item is a dict with the following fields:
**Required per item:**
- `video_name` (str): Name/identifier of the output video file
- `prompt` (str): Text describing the video to generate. Supports Chinese and English.
**Optional per item - Input Materials:**
- `first_frame` (str): URL for the first frame image
- `last_frame` (str): URL for the last frame image
- `reference_images` (list[str]): 1-4 reference image URLs for style/content guidance
- `reference_videos` (list[str]): 0-3 reference video URLs (mp4/mov, 2-15s each, total ≤15s)
- `reference_audios` (list[str]): 0-3 reference audio URLs (mp3/wav, 2-15s each, total ≤15s)
**Optional per item - Video Output Parameters:**
- `ratio` (str): Aspect ratio. Options: "16:9" (default), "9:16", "4:3", "3:4", "1:1", "2:1", "21:9", "adaptive"
- `duration` (int): Video length in seconds. Range: 2-12s depending on model
- `resolution` (str): Video resolution. Options: "480p", "720p", "1080p"
- `frames` (int): Total frame count. Must be in [29, 289] and follow format 25 + 4n
- `camera_fixed` (bool): Lock camera movement. Default: false
- `seed` (int): Random seed for reproducibility. Range: [-1, 2^32-1]
- `watermark` (bool): Whether to add watermark. Default: false
- `generate_audio` (bool): Whether to generate audio. Only Seedance 1.5 supports this
- `tools` (list[dict]): Tool configuration, e.g., `[{"type": "web_search"}]`
Input Modes
1. **Text-to-Video**: Only provide prompt, no images/videos 2. **First Frame Guidance**: Provide first_frame for starting image 3. **First + Last Frame Guidance**: Provide both for transition video 4. **Reference Images**: Provide reference_images for style/content guidance 5. **Multimodal Reference**: Combine reference_images, reference_videos, reference_audios
Return Value
Script Return Info
The video_generate.py script will return these info:
{
"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", ...}]
}Based on the script return info, the final response returned to the user consists of a description of the video generation task and the video URL(s). You may download the video from the URL, but the video URL should still be provided to the user for viewing and downloading.
Note: the URL is the 'url' in the success_list of script return info. The URL must return in two ways:
Final Return Info
For OpenClaw
1. **First, save/download the generated video to an allowed directory**:
- Recommended: `~/.openclaw/workspace/`
2. **Use the `message tool` to send the video** with these parameters:
{
"action": "send",
"message": "Optional text description",
"media": "/root/.openclaw/workspace/generated-video.mp4"
}- The tool will automatically: read the local file, upload to the channel server as a web URL, and send as a video message
3. **Verify success**: Check that the tool returns `{"ok": true}` to confirm the video was sent successfully
4. **Normal Text** not message tool: After generation, show list of videos with Markdown format, for example:
<video src="https://example.com/video1.mp4" width="640" controls>video-1</video>
**Very important**: The video URL must be an **original online resource link** starting with `https://`, **not** a local video address you have downloaded.
For Normal
You should return three types of information: 1. File format, return the video file (if you have some other methods to send the video file) and the local path of the video, for example: local_path: /root/.openclaw/workspace/skills/video-generate/xxx.mp4 2. After generation, show list of videos with Markdown format, for example:
<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>
Code Implementation
See [scripts/video_generate.py](scripts/video_generate.py) for the full implementation.
Example Usage
# 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欢迎来到 AgentKit 代码工坊(Samples)仓库! AgentKit 是火山引擎推出的企业级 AI Agent 开发平台,为开发者提供完整的 Agent 构建、部署和运维解决方案。平台通过标准化的开发工具链和云原生基础设施,显著降低复杂智能体应用的开发部署门槛。 本代码库包含了一系列示例和教程,帮助您理解、实现和集成 AgentKit 的各项功能到您的应用中。
Other skills on agentkit-samples.
- /code-optimization
Optimize code performance through iterative improvements (max 2 rounds). Benchmark execution time and memory usage, compare against baseline implementations, and generate detailed optimization reports. Supports C++, Python, Java, Rust, and other languages.
Open skill - /image-video-gen
根据文字描述生成视频,一个生成图片和视频的工作流技能。依赖 skills: byted-web-search, image-generate, video-generate。注意:此 workflow 没有执行脚本,只是一个描述性的文档。
Open skill - /skills-management
Manage AgentKit skills, SkillHub/skillhub, skill centers, and skill spaces. Use this skill whenever the user has a management intent for AgentKit skills, skill中心, skill 空间, skill space, or skill hub, including listing, inspecting, downloading, fetching, uploading, publishing,
Open skill - /tos-file-access
Upload files or directories to TOS-compatible object storage for Volcano Engine or BytePlus and download files from URLs. Use this skill when (1) Upload Agent-generated files or directories for sharing, (2) Download files from URLs before Agent processing.
Open skill - /veadk-go-skills
根据用户的功能需求,完成与 VeADK-Go 相关的功能; 包括:直接根据需求生成 Agent;将Enio Agent转换为VeADK-Go Agent。
Open skill - /veadk-skills
根据用户的功能需求,完成与 VeADK 相关的功能。
Open skill

