Skip to content

xuliang2024/seedance2-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seed2.io Super Seed 2 Lite API

中文文档

Generate videos from text, images, video references, audio references, and first/last frames through the Seed2.io REST API. Optimized for Seedance 2.0 Mini, the lowest-cost Seedance 2.0 tier for 720p AI video generation.

Website: https://seed2.io API docs: https://seed2.io/api-docs

Search keywords: Seed2.io, Seedance 2.0 Mini, Seedance Mini API, cheapest Seedance 2.0, Super Seed 2 Lite, AI video generation, text to video, image to video, real-person upload, human video generation, video reference, audio reference, first last frame, Codex Skill, Claude Code Skill.

Highlights

  • Base URL: https://api.seed2.io
  • Create video: POST /v1/video/generate
  • Query task: GET /v1/tasks/:task_id
  • Backend model: st-ai/super-seed2-lite
  • Best-value tier: Seedance_2.0_mini_lite, 720p, about $0.058/sec
  • Real-person uploads: supported for portrait, character, scene, and motion reference workflows
  • Duration: 4-15 seconds
  • Ratios: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9
  • Prompt references: English aliases such as @image_file_1, @video_file_1, and @audio_file_1 are accepted. The API normalizes them upstream to 【@图片1】, 【@视频1】, and 【@音频1】.

Quick Start

1. Get an API Key

Sign up at seed2.io and copy your API key from the Account page.

2. Create a Video

curl -X POST https://api.seed2.io/v1/video/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A cat playing piano in a jazz bar, cinematic lighting",
    "model": "seedance2.0_fast_direct",
    "resolution": "720p",
    "duration": 5,
    "ratio": "16:9"
  }'

Response:

{
  "code": 0,
  "message": "ok",
  "data": {
    "task_id": 456,
    "upstream_task_id": "abc",
    "status": "pending",
    "points_cost": 2900,
    "balance": 7100,
    "estimated": {
      "model": "seedance2.0_fast_direct",
      "resolution": "720p",
      "duration": 5,
      "per_sec": 580
    }
  }
}

3. Query the Task

curl https://api.seed2.io/v1/tasks/456 \
  -H "Authorization: Bearer YOUR_API_KEY"

Completed response:

{
  "code": 0,
  "message": "ok",
  "data": {
    "id": 456,
    "status": "completed",
    "result": {
      "video_url": "https://...",
      "duration": 5
    },
    "points_cost": 2900
  }
}

Python SDK

This repository includes a lightweight client in seedance/:

from seedance import Seedance

client = Seedance(api_key="sk-s2-xxxx")

result = client.generate(
    prompt="A cat playing piano in a jazz bar, cinematic lighting",
    model="seedance2.0_fast_direct",
    resolution="720p",
    duration=5,
    ratio="16:9",
)

print(result["video_url"])

Supported Models

Model ID Display name Resolutions Default Credits/sec
Seedance_2.0_mini Seedance 2.0 Mini 720p 720p 580
Seedance_2.0_mini_lite Seedance 2.0 Mini Lite 720p 720p 580
seedance2.0_fast_direct Seedance 2.0 Fast 720p 720p 580
seedance2.0_direct Seedance 2.0 720p 720p 1,160
seedance2.0_fast_vision Seedance 2.0 Fast VIP 480p, 720p 720p 480p: 580 / 720p: 1,182
seedance2.0_vision Seedance 2.0 VIP 480p, 720p, 1080p 720p 480p: 886 / 720p: 1,477 / 1080p: 2,954

Legacy aliases seedance_2.0_fast and seedance_2.0 are still accepted and map to the direct tiers.

How to Choose a Model

Tier Best for
Seedance_2.0_mini / Seedance_2.0_mini_lite New lightweight Seedance tiers. Usually finish in 2-8 minutes. Best default choice for cost-performance. Output is fixed at high-quality 720p.
seedance2.0_fast_direct / seedance2.0_direct Lower-cost direct tiers. Output is fixed at 720p but can be slower, roughly 10 minutes to 3 hours. Good for batch jobs when you can wait.
seedance2.0_fast_vision Faster premium vision tier. Often finishes within 10 minutes, sometimes around 2 minutes. Supports 480p and 720p. Recommended for references plus speed.
seedance2.0_vision Highest-end tier. More expensive but fast, usually 3-10 minutes. Supports 480p, 720p, and 1080p. Best for high-quality output, complex motion, and demanding reference scenes.

Parameters

Parameter Type Required Description
prompt string Yes Text prompt, max 5,000 characters. You can reference uploaded assets with @image_file_1, @video_file_1, @audio_file_1, @图片1, or @图片一.
model string No One of the supported model IDs. Default: seedance2.0_fast_direct.
resolution string No Must be supported by the selected model. Default: the model default, usually 720p.
duration int No Integer from 4 to 15 seconds. Default: 5.
ratio string No One of 16:9, 9:16, 1:1, 4:3, 3:4, 21:9. Default: 16:9.
functionMode string No omini for normal text/reference generation, or first_last_frame for first/last-frame transitions. Aliases omni_reference and first_last_frames are accepted.
image_files string[] No Public image URLs, max 9. You can also pass image_file_1 ... image_file_9.
video_files string[] No Public video URLs, max 3. You can also pass video_file_1 ... video_file_3 or video_url.
audio_files string[] No Public audio URLs, max 3. Audio cannot be used alone; include image/video references.
image_url string Conditional Public first-frame image URL. Required for functionMode: "first_last_frame" unless image_files[0] is supplied.
end_image_url string No Optional final-frame URL for first/last-frame transitions.
seed int No Optional deterministic seed from 0 to 4,294,967,295.
run_extra object/string No Optional advanced upstream parameters.

Examples

Text to Video

result = client.generate(
    prompt="Sunrise over Mount Fuji, cinematic timelapse",
    model="Seedance_2.0_mini_lite",
    duration=5,
)

Image to Video

result = client.generate(
    prompt="The woman in @image_file_1 walks through a garden, petals falling",
    model="Seedance_2.0_mini_lite",
    image_files=["https://example.com/woman.jpg"],
)

Video Reference

result = client.generate(
    prompt="A robot performs the same motion as @video_file_1 in a futuristic city",
    model="seedance2.0_fast_vision",
    resolution="720p",
    video_files=["https://example.com/dance.mp4"],
)

Image + Audio

result = client.generate(
    prompt="The person in @image_file_1 speaks naturally with @audio_file_1",
    model="seedance2.0_fast_vision",
    resolution="720p",
    image_files=["https://example.com/speaker.jpg"],
    audio_files=["https://example.com/speech.mp3"],
)

First / Last Frames

result = client.generate(
    prompt="Smooth cinematic transition from first frame to final frame",
    model="seedance2.0_vision",
    resolution="1080p",
    functionMode="first_last_frame",
    image_url="https://example.com/first.png",
    end_image_url="https://example.com/last.png",
)

Pricing

Model Resolution Credits/sec USD/sec RMB/sec
Seedance_2.0_mini 720p 580 $0.058 ¥0.393
Seedance_2.0_mini_lite 720p 580 $0.058 ¥0.393
seedance2.0_fast_direct 720p 580 $0.058 ¥0.393
seedance2.0_direct 720p 1,160 $0.116 ¥0.785
seedance2.0_fast_vision 480p 580 $0.058 ¥0.393
seedance2.0_fast_vision 720p 1,182 $0.118 ¥0.800
seedance2.0_vision 480p 886 $0.089 ¥0.600
seedance2.0_vision 720p 1,477 $0.148 ¥1.000
seedance2.0_vision 1080p 2,954 $0.295 ¥2.000

Assumptions used for display: 1 USD = 10,000 credits, approximate USD/CNY = 6.77.

Ready-to-Run Scripts

File Description
examples/python/text_to_video.py Text to video
examples/python/image_to_video.py Image to video
examples/python/video_reference.py Video reference
examples/python/image_audio_lipsync.py Image + audio
examples/python/batch_generate.py Batch generation
examples/javascript/text_to_video.mjs Node.js text to video
examples/javascript/image_to_video.mjs Node.js image to video
examples/curl/examples.sh cURL examples
export SEEDANCE_API_KEY="sk-s2-xxxx"
python examples/python/text_to_video.py

Agent Skill: Codex and Claude Code

This repo includes a reusable Agent Skill at skills/seed2-video/SKILL.md. It teaches Codex or Claude Code how to choose Seed2 model tiers, build API payloads, use prompt references, and poll video tasks.

One-click install for Codex:

bash -c 'set -e; tmp=$(mktemp -d); git clone --depth 1 https://github.com/xuliang2024/seedance2-api "$tmp"; mkdir -p ~/.codex/skills; rm -rf ~/.codex/skills/seed2-video; cp -R "$tmp/skills/seed2-video" ~/.codex/skills/; rm -rf "$tmp"; echo "Installed Codex skill: seed2-video"'

One-click install for Claude Code:

bash -c 'set -e; tmp=$(mktemp -d); git clone --depth 1 https://github.com/xuliang2024/seedance2-api "$tmp"; mkdir -p ~/.claude/skills; rm -rf ~/.claude/skills/seed2-video; cp -R "$tmp/skills/seed2-video" ~/.claude/skills/; rm -rf "$tmp"; echo "Installed Claude Code skill: seed2-video"'

Then ask your agent something like:

Use the seed2-video skill to generate a 5s 16:9 video from this prompt: ...

About

Seedance 2.0 Mini API examples, Python SDK, and Codex/Claude Code skill for Seed2.io AI video generation. Cheapest Seedance tier: $0.058/sec, real-person uploads supported.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages