Seedance 2.0 Fast
Seedance 2.0 Fast 是 Seedance 2.0 的更快、更实惠版本,支持相同的多模态能力 — 文本、图片、视频、音频作为参考输入。
模型
| 模型名称 | 时长 | 分辨率 | 宽高比 |
|---|---|---|---|
doubao-seedance-2.0-fast | 4-15s | 480p, 720p(不支持 1080p) | 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive |
定价
按公式计费,是否使用视频参考会影响计费方式:
- 不带视频:
输出时长 × 每秒费率 - 带视频:
(输入视频时长 + 输出时长) × 每秒费率
| 分辨率 | 不带视频参考 | 带视频参考 |
|---|---|---|
| 480p | 14.5 credits/s ($0.0725/s) | 10 credits/s ($0.05/s) |
| 720p | 30.5 credits/s ($0.1525/s) | 20 credits/s ($0.10/s) |
使用视频参考时,输入视频时长会自动检测。计费时长 = 输入视频时长 + 输出视频时长。
示例:
- 720p, 5s, 纯文本:30.5 × 5 = 152.5 credits ($0.7625)
- 720p, 输出10s, 输入视频5s:20 × (5 + 10) = 300 credits ($1.50)
- 480p, 5s, 纯文本:14.5 × 5 = 72.5 credits ($0.3625)
- 480p, 输出15s, 输入视频5s:10 × (5 + 15) = 200 credits ($1.00)
创建任务
POST https://api.aivideoapi.ai/v1/videos/generations
请求体
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 必须为 doubao-seedance-2.0-fast |
input | object | 是 | 生成参数,见下方 |
callback_url | string | 否 | 接收任务完成/失败通知的 URL |
Input 对象
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
prompt | string | 是 | 文本描述(中英文均可,建议不超过 500 字) |
generation_type | string | 否 | 生成模式:omni_reference(默认)或 first_and_last_frames。详见生成模式 |
image_urls | string[] | object[] | 否 | 参考图片 URL(omni_reference 最多 9 张,first_and_last_frames 1-2 张)。详见 image_urls 格式 |
video_urls | string[] | 否 | 参考视频 URL(最多 3 个,总时长不超过 15s)。first_and_last_frames 模式下忽略 |
audio_urls | string[] | 否 | 参考音频 URL(最多 3 个,总时长不超过 15s)。first_and_last_frames 模式下忽略 |
duration | integer | 否 | 视频时长(秒):4-15(默认:5)。详见时长 |
aspect_ratio | string | 否 | 宽高比,详见宽高比(默认:adaptive) |
resolution | string | 否 | 480p 或 720p(默认:720p)。Fast 不支持 1080p,如需 1080p 请使用 doubao-seedance-2.0 |
generate_audio | boolean | 否 | 是否生成同步音频(默认:true) |
watermark | boolean | 否 | 是否添加水印(默认:false) |
seed | integer | 否 | 随机种子,控制生成的随机性。取值范围:[-1, 4294967295](默认:-1,使用随机值)。详见随机种子 |
return_last_frame | boolean | 否 | 是否返回视频尾帧图片(默认:false)。详见尾帧图片 |
web_search | boolean | 否 | 启用网络搜索获取实时信息(默认:false) |
生成模式
| 值 | 说明 |
|---|---|
omni_reference | (默认) 全能模式。支持图片、视频、音频作为参考输入。 |
first_and_last_frames | 首尾帧模式。提供 1-2 张图片:第一张作为首帧,第二张(可选)作为尾帧。video_urls 和 audio_urls 会被忽略。计费使用「不带视频参考」费率。 |
image_urls 格式
image_urls 支持字符串数组和对象数组两种格式:
字符串数组:
"image_urls": [
"https://example.com/photo1.jpg",
"https://example.com/photo2.jpg"
]
对象数组:
"image_urls": [
{ "url": "https://example.com/photo1.jpg" },
{ "url": "https://example.com/photo2.jpg" }
]
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
url | string | 是 | 图片 URL |
关于真人图片: 所有图片会自动经过内容审核系统处理。如果图片包含名人、明星等敏感内容,任务会失败并自动退还积分。每张图片额外需要 2-3 秒处理时间。
支持的输入组合
- 纯文本
- 文本(可选)+ 图片
- 文本(可选)+ 视频
- 文本(可选)+ 图片 + 音频
- 文本(可选)+ 图片 + 视频
- 文本(可选)+ 视频 + 音频
- 文本(可选)+ 图片 + 视频 + 音频
音频不能单独使用,必须搭配至少一张图片或一个视频。
示例:文生视频
curl -X POST https://api.aivideoapi.ai/v1/videos/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2.0-fast",
"callback_url": "https://your-server.com/webhook",
"input": {
"prompt": "无人机航拍日落时分的山脉,电影级光影效果",
"duration": 5,
"aspect_ratio": "16:9",
"resolution": "480p",
"generate_audio": true
}
}'
示例:图片 + 视频 + 音频参考
curl -X POST https://api.aivideoapi.ai/v1/videos/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2.0-fast",
"callback_url": "https://your-server.com/webhook",
"input": {
"prompt": "以真人图片作为主角,跟随视频的运镜方式,以音频作为背景音乐",
"image_urls": [
{ "url": "https://example.com/person.jpg" },
{ "url": "https://example.com/background.jpg" }
],
"video_urls": ["https://example.com/reference1.mp4", "https://example.com/reference2.mp4"],
"audio_urls": ["https://example.com/bgm.mp3", "https://example.com/sfx.wav"],
"duration": 5,
"aspect_ratio": "16:9",
"resolution": "480p"
}
}'
示例:首尾帧模式
使用 generation_type: "first_and_last_frames" 控制视频的起始帧和结束帧。提供 1 张图片(仅首帧)或 2 张图片(首帧 + 尾帧)。
curl -X POST https://api.aivideoapi.ai/v1/videos/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2.0-fast",
"callback_url": "https://your-server.com/webhook",
"input": {
"prompt": "一个人从公园走到市中心",
"generation_type": "first_and_last_frames",
"image_urls": [
{ "url": "https://example.com/start-frame.jpg" },
{ "url": "https://example.com/end-frame.jpg" }
],
"duration": 5,
"aspect_ratio": "16:9",
"resolution": "480p"
}
}'
first_and_last_frames模式下,video_urls和audio_urls会被忽略。计费使用「不带视频参考」费率。
示例:启用网络搜索
启用 web_search 后,模型可以检索实时信息来辅助视频生成。
curl -X POST https://api.aivideoapi.ai/v1/videos/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2.0-fast",
"callback_url": "https://your-server.com/webhook",
"input": {
"prompt": "生成一段关于最新 SpaceX 火箭发射的新闻短片",
"duration": 5,
"aspect_ratio": "16:9",
"resolution": "480p",
"web_search": true
}
}'
响应
{
"code": 200,
"msg": "success",
"data": {
"taskId": "cbf6b69d-4f03-4817-8ed7-94c0292184a8"
}
}
查询任务
curl https://api.aivideoapi.ai/v1/tasks/{taskId} \
-H "Authorization: Bearer sk-your-api-key"
状态变化:pending -> processing -> completed 或 failed。
处理中
{
"id": "e717a5ee-2ed4-47f4-8cc3-53394f1abb35",
"status": "processing",
"model": "doubao-seedance-2.0-fast",
"created_at": 1774706165,
"progress": null
}
完成
{
"id": "7d89c51e-9430-410e-909e-df347131ebaa",
"status": "completed",
"model": "doubao-seedance-2.0-fast",
"created_at": 1774790227,
"completed_at": 1774796529,
"output": {
"urls": [
"https://file.aivideoapi.ai/videos/2026/04/07/abc.mp4"
],
"last_frame_url": "https://file.aivideoapi.ai/images/2026/04/07/abc-last-frame.png",
"metadata": {
"seed": 41485,
"ratio": "16:9",
"duration": 5,
"resolution": "480p",
"generate_audio": true,
"framespersecond": 24
}
}
}
last_frame_url仅在请求中设置return_last_frame: true时返回。详见尾帧图片。 视频 URL 有效期为 24 小时,请在生成完成后及时下载。
失败
{
"id": "57c8772c-f834-46f3-9b7d-81f92e104050",
"status": "failed",
"model": "doubao-seedance-2.0-fast",
"created_at": 1774793758,
"error": {
"code": "upstream_error",
"message": "The request failed because the input text may contain sensitive information. Request id: 0217747937596950e290995bd2535df6af5f05331d9ca5663eeee"
}
}
任务失败时,预扣的积分会自动退还。
回调 (Callback)
创建任务时传入 callback_url,系统会在任务完成或失败时自动向你的 URL 发送 POST 请求。
任务完成时回调
{
"id": "7d89c51e-9430-410e-909e-df347131ebaa",
"status": "completed",
"model": "doubao-seedance-2.0-fast",
"created_at": 1774790227,
"completed_at": 1774796529,
"output": {
"urls": [
"https://file.aivideoapi.ai/videos/2026/04/07/abc.mp4"
],
"last_frame_url": "https://file.aivideoapi.ai/images/2026/04/07/abc-last-frame.png",
"metadata": {
"seed": 41485,
"ratio": "16:9",
"duration": 5,
"resolution": "480p",
"generate_audio": true,
"framespersecond": 24
}
}
}
任务失败时回调
{
"id": "57c8772c-f834-46f3-9b7d-81f92e104050",
"status": "failed",
"model": "doubao-seedance-2.0-fast",
"created_at": 1774793758,
"error": {
"code": "upstream_error",
"message": "The request failed because the input text may contain sensitive information. Request id: 0217747937596950e290995bd2535df6af5f05331d9ca5663eeee"
}
}
任务失败时,预扣的积分会自动退还。
参数详解
时长
整数,单位:秒。默认值:5。
- 取值范围:4-15
- 时长影响计费 — 详见定价
宽高比
默认值:adaptive。
支持的值:16:9、4:3、1:1、3:4、9:16、21:9、adaptive
设置为 adaptive 时,模型根据输入自动选择最佳宽高比:
- 文生视频:根据提示词智能选择
- 图生视频(首帧/首尾帧):根据上传图片的宽高比匹配
- 多模态参考:如果意图是首帧生视频/编辑/延长,以该图片或视频为准;否则以第一个媒体文件为准(优先级:视频 > 图片)
实际使用的宽高比通过查询接口返回的 metadata.ratio 获取。
随机种子
整数。默认值:-1。
- 取值范围:[-1, 4294967295] 之间的整数
- 实际使用的 seed 通过查询接口返回的
metadata.seed获取
注意
- 相同的请求下,模型收到不同的 seed 值,如:不指定 seed 值或令 seed 取值为
-1(会使用随机数替代)、或手动变更 seed 值,将生成不同的结果。- 相同的请求下,模型收到相同的 seed 值,会生成类似的结果,但不保证完全一致。
尾帧图片
布尔值。默认值:false。
true:返回生成视频的尾帧图像。设置为true后,可通过查询任务接口在output.last_frame_url字段获取尾帧图像。宽高像素值与生成的视频保持一致,无水印。false:不返回尾帧图像。
使用该参数可实现生成多个连续视频:以上一个生成视频的尾帧作为下一个视频任务的首帧,快速生成多个连续视频。
输入要求
图片
- 格式:JPEG、PNG、WebP、BMP、TIFF、GIF
- 宽高比(宽/高):0.4 ~ 2.5
- 尺寸:每边 300 ~ 6000 px
- 大小:单张不超过 30 MB
视频
- 格式:MP4、MOV
- 分辨率:480p、720p
- 时长:单个 2-15s,最多 3 个参考视频,所有视频总时长不超过 15s
- 宽高比(宽/高):0.4 ~ 2.5
- 尺寸:每边 300 ~ 6000 px
- 画面像素(宽 × 高):409,600 ~ 927,408(例:640×640=409,600 满足最小值,834×1112=927,408 满足最大值)
- 大小:单个不超过 50 MB
- 帧率:24 ~ 60 FPS
音频
- 格式:WAV、MP3
- 时长:单个 2-15s,总时长不超过 15s
- 大小:单个不超过 15 MB
分辨率参考
480p
| 宽高比 | 像素 |
|---|---|
| 16:9 | 864 x 496 |
| 4:3 | 752 x 560 |
| 1:1 | 640 x 640 |
| 3:4 | 560 x 752 |
| 9:16 | 496 x 864 |
| 21:9 | 992 x 432 |
720p
| 宽高比 | 像素 |
|---|---|
| 16:9 | 1280 x 720 |
| 4:3 | 1112 x 834 |
| 1:1 | 960 x 960 |
| 3:4 | 834 x 1112 |
| 9:16 | 720 x 1280 |
| 21:9 | 1470 x 630 |
ℹ️ Fast 模型不支持 1080p。需要 1080p 输出请使用
doubao-seedance-2.0。
常见错误码
请求失败时,API 返回 JSON 格式的错误响应:
{
"error": {
"code": "insufficient_credits",
"message": "Your credit balance is too low. Please top up.",
"type": "billing_error"
}
}
错误码一览
| HTTP 状态码 | 错误码 | 类型 | 说明 |
|---|---|---|---|
| 400 | invalid_request | invalid_request_error | 缺少必填参数或参数无效 |
| 401 | invalid_api_key | authentication_error | API Key 无效、已禁用或已删除 |
| 402 | insufficient_credits | billing_error | 积分余额不足,请充值 |
| 403 | ip_not_allowed | permission_error | 请求 IP 不在 Key 的白名单中 |
| 404 | model_not_found | invalid_request_error | 模型不存在或已停用 |
| 404 | task_not_found | invalid_request_error | 任务 ID 不存在 |
| 429 | rate_limit_exceeded | rate_limit_error | 请求过于频繁,请降低频率 |
| 429 | spend_limit_exceeded | billing_error | 达到 Key 的消费限额(每小时/每天/总量) |
| 500 | internal_error | api_error | 服务器内部错误 |
| 503 | upstream_error | upstream_error | 上游 AI 服务返回错误 |
常见场景
invalid_request (400)
缺少必填字段或参数格式错误时返回。
{
"error": {
"code": "invalid_request",
"message": "'model' is required.",
"type": "invalid_request_error"
}
}
insufficient_credits (402)
积分不足。可通过 GET /v1/credits 查询余额,前往 Dashboard > Billing 充值。
invalid_api_key (401)
可能原因:
- Key 不以
sk-开头 - Key 已被禁用或删除
- 用户账户已被封禁
upstream_error (503)
上游 AI 服务返回错误,可能原因:
- 输入内容包含敏感或违规信息
- 上游服务暂时不可用
- 请求参数不被上游支持
因上游错误导致任务失败时,预扣积分会自动退还。