Skip to main content
This page ships a ready-to-use Agent Skill: one zero-dependency script covers all three Seedance 2.0 models (mini / fast / standard), switched with --model. Put it into whichever coding agent you use and a single sentence produces a video — the whole thing is just two files. It is also this site’s first video-model skill: unlike images, video generation is an async task, and the script already wraps the full submit → poll → download flow.

What the skill does

One combined skill; the script picks the generation mode from which images you pass and their roles:

Text to video

Prompt only → a brand-new video, with synced audio by default (dialogue, sound effects, ambience).

Image to video

Pass a first-frame image to animate a still; add a last-frame image for a smooth first-to-last transition.

Reference to video

Pass up to 9 reference images → new footage that keeps their characters, objects, or style.

Which model to choose

The three models are called exactly the same way; they differ in resolution cap, speed, and price. The script handles the differences per --model:
Rule of thumb: stick with the default mini for everyday and agent scenarios; need 1080p or top quality--model std. All aspect ratios cost the same within a resolution tier, duration bills linearly per second, and the frame rate is fixed at 24fps. The discount groups SD2Mini / SD2Fast run until September 7, 2026 23:59 (UTC+8); after that the groups stay online and the multiplier returns to 0.18x — see the group notes on the overview page.

Which Agents can use it

A Skill is essentially a folder: a note for the agent to read (SKILL.md) plus a script that does the work. So any coding agent that can read local files and run shell commands can use itCodex, OpenClaw, hermes-agent, Claude Code, and the like.The only requirement: the machine running the agent (your laptop or a server) has Python 3 and internet access (the script calls api.apiyi.com directly). The script uses only the Python standard library — nothing to pip install.

Set up in 3 steps

① Create the folder, paste the files

Create a skill folder and drop in the two files below (full contents in the next two sections):

② Put your key next to it

Write your APIYI API key into seedance2/.env (create one in the api.apiyi.com console; the token must have the SeeDance2 group enabled — or the discounted SD2Mini / SD2Fast — with pay-as-you-go billing):
The script reads the key from this .env automatically — no extra configuration or environment variables needed.
.env holds your secret key. If the skill is shared inside a project repository, add .env to .gitignore and never commit it.

③ Hand it to your Agent

  • Agents with skill auto-discovery (e.g. Claude Code): put the whole seedance2/ folder into its skills directory — personal ~/.claude/skills/, or project-level .claude/skills/ (shared with the repo).
  • Other agents: follow their own skill/plugin conventions; or simplest of all — tell the agent to “read the SKILL.md in this folder and follow it”.
That’s it — jump to How to use it for examples.

SKILL.md

Create seedance2/SKILL.md with the full content below (the description states “what it does + when to use it”, which is what the agent uses to auto-trigger it):
name must be lowercase letters + hyphens. In agents with slash commands, the folder name is the command — seedance2 gives you /seedance2. ${CLAUDE_SKILL_DIR} is Claude Code’s skill-directory variable; in other agents just use the script’s actual path.

scripts/seedance_video.py

Create seedance2/scripts/seedance_video.py — pure Python standard library, same request code as this site’s video generation API reference, verified working:

How to switch model

Switching models is just --model, three values:
The token’s group decides which models it can call: the regular SeeDance2 group (0.18x) runs all three; the discount groups are single-model lanesSD2Mini (0.10x) only carries mini, SD2Fast (0.15x) only carries fast, and calling any other model with a discount token returns “no available channel for this model”. For all three models on one key, a SeeDance2 token is simplest; open dedicated discount tokens once your volume justifies it — see the group notes on the overview page.

Expect a 2-5 minute wait (important)

Video generation is an async task — the biggest difference from the image skills:
  • The script wraps the whole flow: submit → poll every 15 seconds → auto-download the mp4 on success. A 720p/5s clip takes about 2-3 minutes end to end; 1080p or longer durations take more.
  • Give the command a long timeout (600+ seconds) or run it in the background — many agents kill commands after a default 2 minutes, before the video is ready. The SKILL.md states this, and agents with background execution (like Claude Code) handle it automatically.
  • If polling ever times out (15 minutes), the task is still queued server-side; the script prints the task_id and a query command so you can fetch it later. No money is wasted — Seedance 2.0 pre-charges on submission and refunds the difference on completion, and rejected submissions (HTTP 400) are never billed.

Why a single sentence generates a video

A common question: I never typed a command — how did “make a video of a cat” produce a clip? Here’s how: on startup, the agent reads each skill’s description in its SKILL.md (a short piece of metadata stating “what this skill does and when to use it”). When your request matches that description (say “generate/make a video”, “animate this image”), the agent decides to invoke the skill on its own, reads the full SKILL.md, and runs the script — you never memorize a command. When you’d rather not rely on the agent guessing, use the explicit invocation below for full control.

How to use it

Natural language (implicit trigger)

Once installed, just talk to your agent:

Explicit invocation (more control)

  • Agents with slash commands (e.g. Claude Code):
  • Any agent / tell it to run the script directly (most universal):

Where the generated video goes

  • With a bare file name for -o (like -o cat.mp4), the video lands in the seedance-output/ folder in the project root (auto-created), right inside your project.
  • The “project root” = the first directory containing .git or .claude found walking up from the script — wherever the agent runs, the video stays in your project, never lost in a temp folder.
  • On completion the script prints one line with the full absolute path, plus file size, elapsed time, and billed tokens, e.g. Video saved to /Users/you/project/seedance-output/cat.mp4 (3.8 MB, 132s elapsed, billed 108900 tokens).
  • The returned video URL expires in 24 hours, which is why the script always downloads first — the local mp4 is the deliverable; never keep the URL as the result.
  • With a path containing directories (like -o videos/cat.mp4 or an absolute path), it saves exactly there, skipping seedance-output/.