seedance-video
Generate videos using ByteDance's Seedance model. Supports text-to-video and image-to-video generation via the volcengine-ark SDK. Activate this skill when the user needs to generate videos, create video content, or produce videos based on text or images.
1How It Works & Mechanism
A single Python script calls the ByteDance Seedance-1.5-pro model via the volcengine-ark SDK to generate videos from text or a first-frame image.
使用字节跳动 Seedance-1.5-pro 模型 (doubao-seedance-1-5-pro-251215) 根据文本或图片生成视频。
The SDK must be installed prior to execution: pip install 'volcengine-python-sdk[ark]'.
pip install 'volcengine-python-sdk[ark]'
Authentication strictly requires reading ARK_API_KEY or SEEDANCE_API_KEY from environment variables (no default value, exits immediately if missing).
API_KEY = require_env_key("ARK_API_KEY", ["SEEDANCE_API_KEY"])
The service endpoint is fixed to Volcano Engine Ark, with doubao-seedance-1-5-pro-251215 as the default model.
BASE_URL = "https://ark.cn-beijing.volces.com/api/v3"
Asynchronous task workflow: create task → poll get status (queued/running/succeeded/failed) → download upon success.
result = client.content_generation.tasks.get(task_id=task_id)
Image-to-video is achieved by appending an image_url item to the content list (representing the first frame image).
"type": "image_url", "image_url": {"url": image_url}
Streams and downloads the generated video to a local file using requests once generation completes.
response = requests.get(url, stream=True, timeout=120)
Secrets and configurations are loaded via the shared repository module env_utils, supporting a three-tier priority of system env and .env files.
from env_utils import load_env, require_env_key
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| api | 火山方舟 Ark API(视频生成后端) |
| package | volcengine-python-sdk[ark](Ark SDK) |
| package | requests(下载生成结果) |
| network | 生成视频/尾帧下载(服务端返回的 URL) |
| reference | Seedance-1.5-pro 提示词指南 |
4Recommended Governance & Evidence
- scripts/: Execute local scripts or commands: python3 scripts/generate_video.py "<prompt>" --wait -o out.mp4 (agent according to SKIL
- 网络端点: Declare external network access: Volcano Engine Ark API https://ark.cn-beijing.volces.com/api/v3 (creating/querying video generation tasks)
- 本地工作目录: File I/O and artifact output: Downloaded video written to path specified by -o (defaults to output.mp4)
5Second-Pass Verification
- [ok] SDK 调用与模型 — SKILL.md description 与 generate_video.py 的 Ark 客户端、默认模型 ID 一致。
- [ok] 凭证强制读取 — generate_video.py 模块级 require_env_key 调用与 SKILL.md 的 ARK_API_KEY/SEEDANCE_API_KEY 说明互证。
- [ok] 固定端点 — BASE_URL 与风险扫描 generate_video.py:40 命中同值,且 SKILL.md Python 示例 base_url 一致。
- [ok] 异步任务与轮询 — create_video_task/get_task_status/wait_for_video 三个函数正文完整展开,状态分支 queued/running/succeeded/failed 与 SKILL.md 一致。
- [ok] 下载行为 — download_file 用 requests 流式写盘;风险扫描仅两点写盘命中(open/write),无其它隐藏落盘。
- [ok] 跨 skill 共享模块 — 脚本 import env_utils 并把 ../common 加入 sys.path,属仓库共享模块,非本 skill 独有依赖。
- [ok] 是否有绕过/降级 — 风险扫描「危险旗标/沙箱」均无命中;全文无 AutomationControlled、无 TLS 关闭,判橙非红据成立。
- [ok] 是否存在本地命令执行面 — 「执行外部程序」无命中;脚本不 spawn 子进程,无可控命令拼接。
6Verdict & Scenarios
f9f1f149e8b1bcd1…