Seedance 2.5 Video
Seedance 2.5 使用异步视频任务接口:先创建任务,再轮询查询任务状态和最终视频地址。该模型使用独立名称 doubao-seedance-2.5,参数范围与 Seedance 2.0 不完全相同。
模型选择
统一视频接口和官方兼容接口均使用 doubao-seedance-2.5。
如需使用 Pro/Fast 2.0 模型,请查看独立的 Seedance 2.0 文档。
接口地址
| 能力 | 方法 | 路径 |
|---|---|---|
| 创建视频任务(兼容官方) | POST | /api/v3/contents/generations/tasks |
| 查询视频任务(兼容官方) | GET | /api/v3/contents/generations/tasks/{task_id} |
| 创建视频任务 | POST | /v1/video/generations |
| 查询视频任务 | GET | /v1/video/generations/{task_id} |
| 创建异步图片审核任务 | POST | /v1/images/moderations/tasks |
| 查询异步图片审核任务 | GET | /v1/images/moderations/tasks/{task_id} |
支持能力
| 能力 | 输入方式 |
|---|---|
| 文生视频 | content 中只传 text |
| 单图图生视频 | content 中传 1 个 image_url,可使用 first_frame 或 reference_image |
| 首尾帧视频 | content 中传 2 个 image_url,分别使用 first_frame 和 last_frame |
| 多图参考 | 使用多个 reference_image,提示词中按“图片 1”“图片 2”引用 |
| 视频参考 | 使用 video_url 和 role: "reference_video" |
| 音频参考 | 使用 audio_url 和 role: "reference_audio",并同时提供文本、图片或视频 |
| 图片审核入库 | 先调用图片审核接口,再把返回的 asset://<asset ID> 用于生成请求 |
2.5 参数范围
| 参数 | 必填 | 说明 |
|---|---|---|
model | 是 | 统一接口和官方兼容接口均传 doubao-seedance-2.5 |
content | 是 | 文本、图片、视频和音频组成的内容数组,至少包含文本、图片或视频之一 |
duration | 否 | 4 到 30 秒;-1 表示智能选择时长;不传时通常为 5 |
resolution | 否 | 仅支持 480p 或 720p |
ratio | 否 | adaptive、21:9、16:9、4:3、1:1、3:4、9:16 |
generate_audio | 否 | 是否生成同步音频,布尔值 |
watermark | 否 | 是否添加水印,布尔值 |
seed | 否 | 随机种子;省略时由模型随机选择 |
return_last_frame | 否 | 为 true 时,成功结果可能返回尾帧图片地址 |
execution_expires_after | 否 | 任务执行超时阈值,范围 3600 到 259200 秒 |
tools | 否 | 可传 [ { "type": "web_search" } ] 开启联网搜索;是否可用以账户权限为准 |
safety_identifier | 否 | 终端用户唯一标识,最多 64 个字符 |
首帧或首尾帧任务建议使用 ratio: "adaptive"。这样可以直接沿用输入图片比例,并保持参数校验一致。
输出像素
| 分辨率 | 16:9 | 4:3 | 1:1 | 3:4 | 9:16 | 21:9 |
|---|---|---|---|---|---|---|
480p | 854×480 | 752×560 | 640×640 | 560×752 | 480×854 | 992×432 |
720p | 1280×720 | 1112×834 | 960×960 | 834×1112 | 720×1280 | 1470×630 |
adaptive 会根据输入素材和任务内容选择合适比例,最终尺寸以任务查询结果为准。
content 内容项
content 是数组,每个元素通过 type 指定输入类型。图片、视频和音频的 URL 必须放在对应的 { "url": "..." } 对象中,不能直接传字符串。
type | 必填字段 | 可选 role | 说明 |
|---|---|---|---|
text | text | 无 | 文本提示词;多段文本按顺序作为输入 |
image_url | image_url.url | reference_image、first_frame、last_frame | 公开图片 URL,或审核通过后的 asset://<asset ID> |
video_url | video_url.url | reference_video | 服务端可直接下载的视频 URL;未传 role 时按参考视频处理 |
audio_url | audio_url.url | reference_audio | 服务端可直接下载的音频 URL;未传 role 时按参考音频处理 |
[
{ "type": "text", "text": "描述希望生成的视频" },
{ "type": "image_url", "role": "reference_image", "image_url": { "url": "asset://reviewed-image-id" } },
{ "type": "video_url", "role": "reference_video", "video_url": { "url": "https://example.com/reference.mp4" } },
{ "type": "audio_url", "role": "reference_audio", "audio_url": { "url": "https://example.com/reference.mp3" } }
]常用组合包括纯文本、文本 + 图片、文本 + 视频、文本 + 音频,以及图片、视频、音频的多模态组合。不能只传音频;content 至少要包含 text、image_url 或 video_url 之一。
平台最多接受 30 张参考图片、10 个参考视频和 10 段参考音频。实际可用数量还可能受素材大小、总时长和账户权限限制。
文生视频
curl -X POST https://cubicspaces.cloud/v1/video/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "doubao-seedance-2.5",
"content": [
{
"type": "text",
"text": "电影感航拍镜头,一座未来城市在日出时逐渐苏醒,镜头平稳向前推进"
}
],
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"generate_audio": true,
"watermark": false
}'创建成功后会返回公开任务 ID:
{
"id": "task_xxx",
"task_id": "task_xxx",
"object": "video",
"model": "doubao-seedance-2.5",
"status": "queued",
"progress": 0,
"created_at": 1780000000
}图片审核
使用真人、商品或其他需要入库的参考图片时,先通过图片审核接口提交公开 URL。审核通过后,把返回的 items[].asset_url 原样用于 content[].image_url.url。
同一个视频生成请求会使用的所有图片,必须放在同一个异步审核任务的 images 数组中,不要拆成多个审核批次。
异步审核
单张、多张、批量或高并发场景均使用异步任务:
curl -X POST https://cubicspaces.cloud/v1/images/moderations/tasks \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "doubao-seedance-2.5",
"images": [
"https://example.com/person.png",
"https://example.com/product.png"
],
"client_request_id": "seedance-25-batch-001"
}'创建接口立即返回任务 ID,初始状态为 queued。单个审核任务最多提交 20 张图片。
{
"code": "success",
"message": "",
"data": {
"id": "amt_xxx",
"model": "doubao-seedance-2.5",
"status": "queued",
"total": 2,
"completed": 0,
"approved": 0,
"rejected": 0,
"failed": 0
}
}查询审核任务:
curl https://cubicspaces.cloud/v1/images/moderations/tasks/amt_xxx \
-H "Authorization: Bearer YOUR_API_KEY"建议每 2 到 5 秒查询一次。处理中状态为 queued、running;终态为 succeeded、partial_succeeded、failed 或 expired。只有图片项状态为 approved 时,才能使用其 asset_url。
图生视频
下面示例直接使用审核接口返回的 asset_url:
curl -X POST https://cubicspaces.cloud/v1/video/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "doubao-seedance-2.5",
"content": [
{
"type": "text",
"text": "参考图片 1 的人物外观,人物在阳光明媚的草地上与小狗互动,保持面部特征一致"
},
{
"type": "image_url",
"role": "reference_image",
"image_url": {
"url": "asset://reviewed-person-asset-id"
}
}
],
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"generate_audio": true
}'首尾帧
{
"model": "doubao-seedance-2.5",
"content": [
{
"type": "text",
"text": "从图片 1 平滑过渡到图片 2,保持主体和镜头运动连贯"
},
{
"type": "image_url",
"role": "first_frame",
"image_url": { "url": "asset://first-frame-asset-id" }
},
{
"type": "image_url",
"role": "last_frame",
"image_url": { "url": "asset://last-frame-asset-id" }
}
],
"duration": 8,
"resolution": "720p",
"ratio": "adaptive"
}视频与音频参考
{
"model": "doubao-seedance-2.5",
"content": [
{
"type": "text",
"text": "参考视频 1 的运镜和音频 1 的节奏,生成同风格的新场景"
},
{
"type": "video_url",
"role": "reference_video",
"video_url": { "url": "https://example.com/reference.mp4" }
},
{
"type": "audio_url",
"role": "reference_audio",
"audio_url": { "url": "https://example.com/reference.wav" }
}
],
"duration": 10,
"resolution": "720p",
"ratio": "16:9"
}官方兼容接口
已有官方调用方可直接使用以下路径:
POST /api/v3/contents/generations/tasks
GET /api/v3/contents/generations/tasks/{task_id}创建示例:
curl -X POST https://cubicspaces.cloud/api/v3/contents/generations/tasks \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "doubao-seedance-2.5",
"content": [
{
"type": "text",
"text": "一只橘猫在雨后的城市街道上奔跑,电影感跟拍镜头"
}
],
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"generate_audio": true
}'创建响应为无外层包装的官方兼容对象:
{
"id": "task_xxx",
"model": "doubao-seedance-2.5",
"status": "queued",
"created_at": 1780000000
}查询任务:
curl https://cubicspaces.cloud/api/v3/contents/generations/tasks/task_xxx \
-H "Authorization: Bearer YOUR_API_KEY"成功响应示例:
{
"id": "task_xxx",
"model": "doubao-seedance-2.5",
"status": "succeeded",
"content": {
"video_url": "https://example.com/generated-video.mp4"
},
"resolution": "720p",
"ratio": "16:9",
"duration": 5,
"usage": {
"completion_tokens": 108900,
"total_tokens": 108900
}
}查询统一视频任务
curl https://cubicspaces.cloud/v1/video/generations/task_xxx \
-H "Authorization: Bearer YOUR_API_KEY"必须使用创建任务时返回的公开 task_xxx,并携带创建该任务时使用的同一个 API Key。
{
"code": "success",
"message": "",
"data": {
"task_id": "task_xxx",
"status": "SUCCESS",
"progress": "100%",
"result_url": "https://example.com/generated-video.mp4",
"properties": {
"origin_model_name": "doubao-seedance-2.5"
},
"usage": {
"prompt_tokens": 0,
"completion_tokens": 108900,
"total_tokens": 108900
}
}
}data.usage.completion_tokens 和 data.usage.total_tokens 是任务完成后的最终有效用量。任务完成前可能不返回 data.usage。
状态
| 接口 | 处理中 | 成功 | 失败或终止 |
|---|---|---|---|
| 官方兼容接口 | queued、running | succeeded | failed、expired、cancelled |
| 统一视频接口 | NOT_START、SUBMITTED、QUEUED、IN_PROGRESS | SUCCESS | FAILURE |
注意事项
- 图片、视频和音频 URL 必须能由平台服务端直接下载,不能返回登录页或 HTML 页面。
- 图片既可以使用公开 URL,也可以使用图片审核接口返回的
asset://<asset ID>。 - 同一生成任务使用的多张图片必须在同一个审核批次中提交。
- 提示词中请按“图片 1”“视频 1”“音频 1”的顺序引用素材,不要把 Asset ID 写进提示词。
content.video_url和data.result_url可能有有效期,请及时下载并保存结果。- 模型与扩展能力是否可用,以账户权限和平台当时提供的能力为准。