Seedance 2.0 API 文档
通过 API v2 接入 Seedance 2.0、2.0 Fast 与 Seedance 2.0 Mini:支持文生视频与图生视频。
快速开始
| 1 | curl -X POST 'https://seedanceapi.org/v2/generate' \ |
| 2 | -H 'Authorization: Bearer YOUR_API_KEY' \ |
| 3 | -H 'Content-Type: application/json' \ |
| 4 | -d '{ |
| 5 | "prompt": "A cinematic aerial shot over coastline at golden hour", |
| 6 | "aspect_ratio": "16:9", |
| 7 | "duration": 10, |
| 8 | "model": "seedance-2.0" |
| 9 | }' |
身份认证
所有请求须在 Authorization 头中携带 Bearer Token。
重要: 请在控制台的 API Keys 页面获取密钥。 → 获取 API 密钥
| 1 | Authorization: Bearer YOUR_API_KEY |
定价(积分)
单次任务按所选模型、时长、分辨率与输入类型扣除积分,详见下表。
如需充值积分,请前往 → 定价页面. (1 美元 = 100 积分)
Seedance 2.0(标准)
画质与效果更强,单位时长积分高于 Fast。
| 时长 | 积分 |
|---|---|
| 5s | 240 credits |
| 10s | 480 credits |
| 15s | 720 credits |
Seedance 2.0 Fast
生成更快、单秒积分更省。
| 时长 | 积分 |
|---|---|
| 5s | 160 credits |
| 10s | 320 credits |
| 15s | 480 credits |
Seedance 2.0 Mini
Mini 版本支持 4–15 秒、480p/720p 与更多画幅选项。
| 分辨率 | 输入类型 | 积分 |
|---|---|---|
| 480p | text / image | ceil(14.25 × seconds) |
| 480p | with reference_video_urls | 9 × seconds |
| 720p | text / image | ceil(30.75 × seconds) |
| 720p | with reference_video_urls | ceil(18.75 × seconds) |
Mini 按 KIE 上游每秒积分加价 50% 计费,最终积分如有小数向上取整。传入 reference_video_urls 时使用含视频输入的较低费率。
API 端点
/v2/generate发起 Seedance 2.0、2.0 Fast 或 Seedance 2.0 Mini 任务。文生视频使用 prompt + aspect_ratio;图生视频使用 prompt + images。
请求体
文本提示(必填,最多 2000 字符)
时长(秒):2.0 / Fast 为 5、10 或 15;Mini 支持 4 到 15 的整数秒。 Defaults to 5.
输出分辨率:480p、720p 或 1080p。Mini 支持 480p 与 720p;Mini 传 1080p 时会按 720p 计费并提交给上游。 Defaults to 720p.
文生视频画幅:16:9、9:16、4:3、3:4。Mini 额外支持 1:1、21:9、adaptive。 Defaults to 16:9 (text-to-video only).
图生视频:1–4 张图片 URL(http/https)
可选:Mini 兼容的参考视频 URL。传入后 Mini 使用含视频输入费率。
可选:Mini 兼容的参考音频 URL。
可选:seedance-2.0(默认)、seedance-2.0-fast 或 seedance-2-mini Defaults to seedance-2.0.
可选:异步回调地址(须公网可访问,不支持 localhost)
可选:是否公开(用于展示位等能力,视平台开放为准)
文生视频
| 1 | { |
| 2 | "prompt": "A slow dolly shot through a neon-lit street in the rain", |
| 3 | "aspect_ratio": "16:9", |
| 4 | "duration": 10, |
| 5 | "model": "seedance-2.0" |
| 6 | } |
图生视频
| 1 | { |
| 2 | "prompt": "The subject walks forward and looks at the camera", |
| 3 | "images": [ |
| 4 | "https://example.com/reference.jpg" |
| 5 | ], |
| 6 | "duration": 5, |
| 7 | "model": "seedance-2.0" |
| 8 | } |
Fast 示例
| 1 | { |
| 2 | "prompt": "Sunrise over misty mountains with birds crossing the frame", |
| 3 | "aspect_ratio": "9:16", |
| 4 | "duration": 15, |
| 5 | "model": "seedance-2.0-fast" |
| 6 | } |
Mini 示例
| 1 | { |
| 2 | "prompt": "A compact product demo with smooth camera motion and clean lighting", |
| 3 | "aspect_ratio": "1:1", |
| 4 | "resolution": "720p", |
| 5 | "duration": 8, |
| 6 | "model": "seedance-2-mini" |
| 7 | } |
响应
Task created
| 1 | { |
| 2 | "code": 200, |
| 3 | "message": "success", |
| 4 | "data": { |
| 5 | "task_id": "n90a1b2c3d4e5f6sd20", |
| 6 | "status": "IN_PROGRESS", |
| 7 | "consumed_credits": 480 |
| 8 | } |
| 9 | } |
/v2/status用 task_id 轮询直到 SUCCESS 或 FAILED;视频地址在 response 字段。
查询参数
POST /v2/generate 返回的 task_id
请求示例
| 1 | curl -X GET 'https://seedanceapi.org/v2/status?task_id=n90a1b2c3d4e5f6sd20' \ |
| 2 | -H 'Authorization: Bearer YOUR_API_KEY' |
Tip: 状态为 SUCCESS 时,data.response 为视频 URL 数组,可用 data.response[0] 取首条。
| 1 | const videoUrl = data.response[0]; |
响应
| 1 | { |
| 2 | "code": 200, |
| 3 | "message": "success", |
| 4 | "data": { |
| 5 | "task_id": "n90a1b2c3d4e5f6sd20", |
| 6 | "status": "SUCCESS", |
| 7 | "consumed_credits": 480, |
| 8 | "created_at": "2026-04-03T10:30:00Z", |
| 9 | "request": { |
| 10 | "prompt": "A slow dolly shot…", |
| 11 | "aspect_ratio": "16:9", |
| 12 | "duration": 10 |
| 13 | }, |
| 14 | "response": [ |
| 15 | "https://cdn.example.com/videos/n90a1b2c3d4e5f6sd20.mp4" |
| 16 | ], |
| 17 | "error_message": null |
| 18 | } |
| 19 | } |
API 测试工具
在浏览器中调试接口,将 YOUR_API_KEY 换成真实密钥。
错误码
| Status | Code | Description |
|---|---|---|
| 400 错误请求 | INVALID_PROMPT | 提示词无效或为空 |
| 400 错误请求 | INVALID_ASPECT_RATIO | 所选模型不支持该 aspect_ratio |
| 400 错误请求 | INVALID_DURATION | 2.0 / Fast 的 duration 须为 5、10 或 15;Mini 支持 4–15 秒 |
| 400 错误请求 | TOO_MANY_IMAGES | 图片数量超限(最多 4 张) |
| 401 未授权 | INVALID_API_KEY | API 密钥无效 |
| 402 | INSUFFICIENT_CREDITS | 积分不足 |
| 404 未找到 | TASK_NOT_FOUND | 任务不存在 |
| 500 服务器内部错误 | INTERNAL_ERROR | 服务器错误 |