360 Secure SkillHub
360 安全技能中心

Seedance2 Gen Video

核心功能:依托火山引擎豆包Seedance2.0系列模型,提供文生视频、图生视频(首/末帧)、多模态参考生成、视频编辑与扩展等能力,可生成带音频的视频,支持自定义分辨率、比例、时长。典型场景:用户需生成、编辑或扩展视频时使用。输入为内容提示、多模态素材URL等参数,输出有效期24小时的视频URL,需提前配置ARK_API_KEY并安装指定SDK。

fackee
fackee
热度 16.02
最近更新 2026-06-26 16:52:40
分类:创作依赖:代码执行 / 第三方 API应用场景:视频编辑 / 图像生成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add seedance2-gen-video
Metadata
name
seedance2-gen-video
description
Generate videos using the Volcengine Doubao Seedance 2.0 model series. Supports text-to-video, image-to-video (first frame/last frame), multimodal reference-to-video, video editing, video extension, and more. Can generate videos with audio, and supports custom resolution/aspect ratio/duration. Use this skill when the user needs to generate, edit, or extend videos, or mentions Seedance or video generation API.
compatibility
Requires Python 3.8+ and volcengine-python-sdk[ark], requires the ARK_API_KEY environment variable to be configured, requires access to the Volcengine API (https://ark.cn-beijing.volces.com)
metadata
{"author":"SkillDeveloper","version":"1.0"}
allowed-tools
Bash(python3:*) Bash(pip:*)

Seedance 2.0 Video Generation Skill

Generate videos using the Volcengine Doubao Seedance 2.0 model series.

Prerequisites

  1. API Key: The ARK_API_KEY environment variable is configured, or provided by the user.
  2. SDK Installation: pip install 'volcengine-python-sdk[ark]'
  3. Asset URLs: Reference images, videos, and audio must be publicly accessible URLs (or platform asset IDs in asset:// format).

Usage Steps

Step 1: Collect Parameters

Confirm the following information with the user:

Parameter Description Default
Prompt Describes the video content to generate Required
Model doubao-seedance-2-0-260128 (high quality) or doubao-seedance-2-0-fast-260128 (fast) High quality
Aspect Ratio 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, or adaptive (follows the input image) 16:9
Duration 4~15 seconds 5
Generate Audio Whether to generate video with audio No
Watermark Whether to add a watermark No
Reference Image URLs 0~9 images, optional (role: reference_image / first_frame / last_frame) None
Reference Video URLs 0~3 videos, optional (role: reference_video) None
Reference Audio URLs 0~3 audio clips, optional (role: reference_audio) None
Web Search Whether to enable (only effective for plain text input) No

Prompt asset referencing rules: In the prompt, use "Image N", "Video N", "Audio N" to reference corresponding assets (N is the order of assets of the same type in the content array, starting from 1).

Step 2: Install Dependencies (First Time)

pip install 'volcengine-python-sdk[ark]'
ARK_API_KEY=$ARK_API_KEY

Step 3: Run the Script

Call scripts/gen_video.py to execute the video generation task.

Basic example (text-to-video):

python3 scripts/gen_video.py \
  --prompt "A cat running on a grassy field, bright sunlight, slow motion" \
  --ratio "16:9" \
  --duration 5

Image-to-video (first frame):

python3 scripts/gen_video.py \
  --prompt "The scene in Image 1, camera slowly pushes forward" \
  --images "https://example.com/frame.jpg" \
  --image-roles "first_frame" \
  --ratio "16:9" \
  --duration 5

First and last frame image-to-video:

python3 scripts/gen_video.py \
  --prompt "Image 1 is the starting frame, Image 2 is the ending frame, camera pans from left to right" \
  --images "https://example.com/start.jpg" "https://example.com/end.jpg" \
  --image-roles "first_frame" "last_frame" \
  --ratio "16:9" \
  --duration 5

Multimodal reference-to-video:

python3 scripts/gen_video.py \
  --prompt "Mimic the camera style of Video 1, use Image 1 as the scene, with Audio 1 as background music" \
  --images "https://example.com/scene.jpg" \
  --image-roles "reference_image" \
  --videos "https://example.com/style.mp4" \
  --audios "https://example.com/music.mp3" \
  --generate-audio \
  --duration 8

Edit video:

python3 scripts/gen_video.py \
  --prompt "Replace the red car in Video 1 with a blue car, keep the camera movement unchanged" \
  --videos "https://example.com/original.mp4" \
  --duration 5

Extend video (multi-segment concatenation):

python3 scripts/gen_video.py \
  --prompt "The scene in Video 1 transitions to Video 2, then continues with Video 3" \
  --videos "https://example.com/v1.mp4" "https://example.com/v2.mp4" "https://example.com/v3.mp4" \
  --duration 10

Video with audio + web search:

python3 scripts/gen_video.py \
  --prompt "Macro shot of a glass frog, showing its beating heart through its transparent abdomen" \
  --generate-audio \
  --web-search \
  --duration 8

Step 4: Get Results

After the script succeeds, it outputs the video URL, which is valid for 24 hours. Advise the user to download or transfer to TOS promptly.

Notes

  • Face policy: Directly uploading images/videos containing real human faces is not supported. Use platform-provided virtual avatars (asset://asset-xxx) or authorized real-person assets.
  • Video URL validity: Generated video URLs are valid for only 24 hours; save them promptly.
  • Unsupported input combinations: "Text + Audio" or "Audio only" input is not supported.
  • Adaptive aspect ratio: When using first/last frame images, it is recommended to set --ratio adaptive to avoid frame jumps.

Parameter Details

See references/api-guide.md