Seedance 2.5 视频生成
curl --request POST \
--url https://ai.xbrod.com/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedance-2.5",
"prompt": "湖面上的纸船,日出时的柔和光线",
"size": "16:9",
"duration": 5,
"resolution": "720p"
}
'import requests
url = "https://ai.xbrod.com/v1/videos"
payload = {
"model": "seedance-2.5",
"prompt": "湖面上的纸船,日出时的柔和光线",
"size": "16:9",
"duration": 5,
"resolution": "720p"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'seedance-2.5',
prompt: '湖面上的纸船,日出时的柔和光线',
size: '16:9',
duration: 5,
resolution: '720p'
})
};
fetch('https://ai.xbrod.com/v1/videos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "task_example",
"object": "video",
"status": "queued",
"model": "seedance-2.5"
}Seedance 2.5
Seedance 2.5 视频生成
seedance-2.5 的生成请求与响应。
POST
/
v1
/
videos
Seedance 2.5 视频生成
curl --request POST \
--url https://ai.xbrod.com/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedance-2.5",
"prompt": "湖面上的纸船,日出时的柔和光线",
"size": "16:9",
"duration": 5,
"resolution": "720p"
}
'import requests
url = "https://ai.xbrod.com/v1/videos"
payload = {
"model": "seedance-2.5",
"prompt": "湖面上的纸船,日出时的柔和光线",
"size": "16:9",
"duration": 5,
"resolution": "720p"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'seedance-2.5',
prompt: '湖面上的纸船,日出时的柔和光线',
size: '16:9',
duration: 5,
resolution: '720p'
})
};
fetch('https://ai.xbrod.com/v1/videos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "task_example",
"object": "video",
"status": "queued",
"model": "seedance-2.5"
}模型选择
| 模型 ID | 请求地址 |
|---|---|
seedance-2.5 | POST /v1/videos |
主要参数
下表列出常用参数;媒体引用的组合限制以接口校验结果为准。| 字段 | 取值或限制 | 说明 |
|---|---|---|
model | seedance-2.5 | 模型 ID |
prompt | string | 内容描述;最多 4000 字符,使用素材时可选 |
duration | -1、4–30;默认 5 | 普通生成 4–30 秒;编辑参考视频时设为 -1,由上游按素材决定输出时长 |
size | adaptive、16:9、4:3、1:1、3:4、9:16、21:9 | 视频宽高比;部分参考素材或编辑模式有额外限制 |
resolution | 480p、720p、1080p;默认 720p | 输出分辨率;draft 为 true 时必须使用 480p |
image_urls | 最多 30 项 | 普通参考图;首尾帧请使用 image_with_roles |
image_with_roles | 最多 30 项 | 带角色的参考图;不能与 image_urls 同时传入 |
video_urls | 最多 10 项 | 参考视频地址;实际时长与格式还需符合模型的素材限制 |
audio_urls | 最多 10 项 | 参考音频地址;实际时长与格式还需符合模型的素材限制 |
seed | integer | 随机种子 |
generate_audio | true / false;默认 false | 是否生成配套音频 |
return_last_frame | true / false;默认 false | 请求生成尾帧;当前网关任务结果只提供主视频文件,不公开尾帧 |
tools | array | 可选联网搜索工具,如 [{"type":"web_search"}] |
nsfw_check | true / false;默认 false | 提交前审核提示词与图片;审核服务异常时请求仍可能继续提交 |
draft | true / false;默认 false | 生成 480p 样片;必须使用 480p 分辨率 |
watermark | true / false;默认 false | 添加 AI 生成水印 |
output_format | mp4、mov;默认 mp4 | 视频封装格式 |
omni_reference_task_type | auto、reference、extend、edit;默认 auto | 参考生成、延长或编辑;edit 需带参考视频、size=adaptive、duration=-1(也可省略 duration) |
素材规则
image_urls 与带 url / role 的 image_with_roles 不能同时提供。首尾帧与视频或音频参考素材的组合需遵守模型限制。
参考视频与音频的时长、格式及总时长需符合当前模型的限制。
编辑参考视频
编辑模式需要video_urls、size: "adaptive"、duration: -1,建议明确设置 omni_reference_task_type: "edit"。编辑时输出时长取决于被选中的参考视频(须为 4–30 秒),不是固定的请求秒数。正常的参考生成仍使用 4–30 秒,并可设置 omni_reference_task_type: "reference";auto 模式仍可能因提示词被上游判定为编辑。
{"model":"seedance-2.5","prompt":"调整视频中的光线","video_urls":["https://example.com/input.mp4"],"size":"adaptive","duration":-1,"omni_reference_task_type":"edit"}
draft_task_id 在本网关续生成正式片。
返回说明
提交后返回任务 ID,不表示视频已经完成。请在 任务查询 中用同一用户的密钥查询状态和结果。授权
本项目签发的 API 密钥,不是上游密钥
请求体
application/json
模型 ID
可用选项:
seedance-2.5 内容描述;最多 4000 字符,使用素材时可选
普通生成 4–30 秒;编辑参考视频时设为 -1,由上游按素材决定输出时长
可用选项:
-1 视频宽高比;部分参考素材或编辑模式有额外限制
可用选项:
adaptive, 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 输出分辨率;draft 为 true 时必须使用 480p
可用选项:
480p, 720p, 1080p 普通参考图;首尾帧请使用 image_with_roles
Maximum array length:
30带角色的参考图;不能与 image_urls 同时传入
Maximum array length:
30Show child attributes
Show child attributes
参考视频地址;实际时长与格式还需符合模型的素材限制
Maximum array length:
10参考音频地址;实际时长与格式还需符合模型的素材限制
Maximum array length:
10随机种子
是否生成配套音频
请求生成尾帧;当前网关任务结果只提供主视频文件,不公开尾帧
可选联网搜索工具,如 [{"type":"web_search"}]
Show child attributes
Show child attributes
提交前审核提示词与图片;审核服务异常时请求仍可能继续提交
生成 480p 样片;必须使用 480p 分辨率
添加 AI 生成水印
视频封装格式
可用选项:
mp4, mov 参考生成、延长或编辑;edit 需带参考视频、size=adaptive、duration=-1(也可省略 duration)
可用选项:
auto, reference, extend, edit