Home / All Skills / Content & Media Creation / seedance-video
Content & Media Creation · freestylefly/canghe-skills

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.

L4 High-Privilege · Graded auth & full auditV1 Commit-PinnedExecute CommandNetwork AccessWrite FileDual-pass Audit
Author freestyleflyGitHub freestylefly/canghe-skills ↗License MIT(仓库根 LICENSE)Commit dd0bf35595
Control levels describe skill capabilities and suggested control measures; they do not represent quality or safety certifications, nor do they dictate usability. Usage decisions rest entirely with users and administrators. Different agent hosts apply varying constraints; do not assume hosts provide automatic protection. Third-party skill copyrights belong to their original authors. Use at your own risk.

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.

skills/canghe-seedance-video/SKILL.md
使用字节跳动 Seedance-1.5-pro 模型 (doubao-seedance-1-5-pro-251215) 根据文本或图片生成视频。
What's happening here: The opening sentence of SKILL.md specifies the model and capabilities; the script side encapsulates create/get using the Ark client.

The SDK must be installed prior to execution: pip install 'volcengine-python-sdk[ark]'.

skills/canghe-seedance-video/SKILL.md
pip install 'volcengine-python-sdk[ark]'
What's happening here: The prerequisites section provides the single installation command; the script also suggests this same command upon an ImportError.

Authentication strictly requires reading ARK_API_KEY or SEEDANCE_API_KEY from environment variables (no default value, exits immediately if missing).

skills/canghe-seedance-video/scripts/generate_video.py
API_KEY = require_env_key("ARK_API_KEY", ["SEEDANCE_API_KEY"])
What's happening here: Calls require_env_key at the module level, exiting immediately via sys.exit if the key is missing to prevent hardcoded secrets.

The service endpoint is fixed to Volcano Engine Ark, with doubao-seedance-1-5-pro-251215 as the default model.

skills/canghe-seedance-video/scripts/generate_video.py
BASE_URL = "https://ark.cn-beijing.volces.com/api/v3"
What's happening here: Hardcodes the official endpoint constant; main() uses it to initialize the Ark client.

Asynchronous task workflow: create task → poll get status (queued/running/succeeded/failed) → download upon success.

skills/canghe-seedance-video/scripts/generate_video.py
result = client.content_generation.tasks.get(task_id=task_id)
What's happening here: get_task_status extracts status/video_url/last_frame_url; wait_for_video waits up to 600s with a 5s polling interval.

Image-to-video is achieved by appending an image_url item to the content list (representing the first frame image).

skills/canghe-seedance-video/scripts/generate_video.py
"type": "image_url", "image_url": {"url": image_url}
What's happening here: In create_video_task, it determines whether to attach an image based on whether --image-url is provided; the backend fetches the image via URL.

Streams and downloads the generated video to a local file using requests once generation completes.

skills/canghe-seedance-video/scripts/generate_video.py
response = requests.get(url, stream=True, timeout=120)
What's happening here: download_file writes to disk with chunk_size=8192 and a 120s timeout.

Secrets and configurations are loaded via the shared repository module env_utils, supporting a three-tier priority of system env and .env files.

skills/canghe-seedance-video/scripts/generate_video.py
from env_utils import load_env, require_env_key
What's happening here: The script appends ../common to sys.path and imports shared env utilities; the .env priority order is system env → project .canghe-skills/.env → ~/.canghe-skills/.env.

2Core Capabilities

01Text-to-video (generate video from text prompts)
02Image-to-video (generate video from a first-frame image)
03Custom generation parameters (duration, aspect ratio, watermark, returning the last frame)
04Task creation and status querying (--status)
05Automatic polling wait (--wait) until success, failure, or timeout
06Automatic download of generated videos to local storage
07Three-tier configuration loading (system environment variables / project .env / user .env)
08Python API reusability (create_video_task / wait_for_video can be directly imported)

3External Dependencies

KindDependency / Endpoint
api火山方舟 Ark API(视频生成后端)
packagevolcengine-python-sdk[ark](Ark SDK)
packagerequests(下载生成结果)
network生成视频/尾帧下载(服务端返回的 URL)
referenceSeedance-1.5-pro 提示词指南

4Recommended Governance & Evidence

Suggested Controls for Safe Operation
For Agent Runtime
Graded/per-use authorization, sandbox recommended
For Administrators
Approval workflow, rollback support, full audit
Evidence & Triggers (File Paths & Excerpts)
  • 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)
Audit Notes: . Two bases: ① Reads credentials for its declared purpose—the script strictly reads the API Key (from env or .env) via require_env_key("ARK_API_KEY", ["SEEDANCE_API_KEY"]). ② Transmits user assets to an external generation/service backend—prompts and first-frame image URLs are sent to Volcano Engine Ark to generate videos, consuming account quota. No reverse engineering, impersonation, defense bypass, or security degradation (no AutomationControlled, no TLS disabling, no sandbox reduction), hence not elevated to red. Although the endpoint belongs to the official ecosystem, the credential + asset outbound transmission classifies it as orange (precedents: image-to-video, ai-image-generation).

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

  • Minimalist structure and fast onboarding: one script + one SKILL.md, ready to use with a single pip install command.
  • Complete encapsulation of the asynchronous lifecycle: creation, polling, waiting, downloading, and status querying (including retaining task IDs via --status).
  • Standardized secret management: no defaults, immediate exit on absence, and supports three-tier loading via env vars and .env without hardcoding.
  • Best for: Creators and developers needing text-to-video or image-to-video generation using ByteDance's Seedance model, who already possess a Volcano Engine API Key and accept outbound asset transmission and quota consumption.
    Not for: Environments where an API Key cannot be provided or outbound network transmission is disallowed; scenarios requiring fully local closed-loop asset handling without using external generation backends.
    Install Agent-Ready
    ① Verified Mirror 2026-10-10
    Option A · Direct DownloadDownload seedance-video.tar.gz
    sha256: f9f1f149e8b1bcd1…
    Option B · Copy Guide for Agent
    install.json
    Agents automatically download and verify mirrors from this JSON guide.
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit dd0bf35595.