Seedance 2.0 视频生成
curl --request POST \
--url https://ai.xbrod.com/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedance-2.0",
"prompt": "湖面上的纸船,日出时的柔和光线",
"size": "16:9",
"duration": 5,
"resolution": "720p"
}
'import requests
url = "https://ai.xbrod.com/v1/videos"
payload = {
"model": "seedance-2.0",
"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.0',
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.0"
}Seedance 2.0
Seedance 2.0 视频生成
seedance-2.0 的生成请求与响应。
POST
/
v1
/
videos
Seedance 2.0 视频生成
curl --request POST \
--url https://ai.xbrod.com/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedance-2.0",
"prompt": "湖面上的纸船,日出时的柔和光线",
"size": "16:9",
"duration": 5,
"resolution": "720p"
}
'import requests
url = "https://ai.xbrod.com/v1/videos"
payload = {
"model": "seedance-2.0",
"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.0',
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.0"
}模型选择
| 模型 ID | 请求地址 |
|---|---|
seedance-2.0 | POST /v1/videos |
主要参数
下表列出常用参数;媒体引用的组合限制以接口校验结果为准。| 字段 | 取值或限制 | 说明 |
|---|---|---|
model | seedance-2.0 | 模型 ID |
prompt | string | 内容描述;最多 4000 字符,使用素材时可选 |
duration | 4–15;默认 5 | 输出时长(秒);当前网关仅接受此区间的整数,不接受 -1 |
size | 16:9、9:16、1:1、4:3、3:4、21:9、adaptive;默认 16:9 | 视频宽高比;部分参考素材或编辑模式有额外限制 |
resolution | 480p、720p、1080p、4k;默认 720p | 输出分辨率 |
image_urls | 最多 9 项 | 参考图片,可作为图生视频或多模态参考素材 |
image_with_roles | 最多 9 项 | 带角色的参考图;不能与 image_urls 同时传入 |
video_urls | 最多 3 项 | 参考视频地址;实际时长与格式还需符合模型的素材限制 |
audio_urls | 最多 3 项 | 参考音频地址;实际时长与格式还需符合模型的素材限制 |
seed | integer | 随机种子 |
generate_audio | true / false;默认 false | 是否生成配套音频 |
return_last_frame | true / false;默认 false | 请求生成尾帧;当前网关任务结果只提供主视频文件,不公开尾帧 |
tools | array | 可选联网搜索工具,如 [{"type":"web_search"}] |
素材规则
image_urls 与带 url / role 的 image_with_roles 不能同时提供。首尾帧与视频或音频参考素材的组合需遵守模型限制。
参考视频与音频的时长、格式及总时长需符合当前模型的限制。
返回说明
提交后返回任务 ID,不表示视频已经完成。请在 任务查询 中用同一用户的密钥查询状态和结果。授权
本项目签发的 API 密钥,不是上游密钥
请求体
application/json
模型 ID
可用选项:
seedance-2.0 内容描述;最多 4000 字符,使用素材时可选
输出时长(秒);当前网关仅接受此区间的整数,不接受 -1
必填范围:
4 <= x <= 15视频宽高比;部分参考素材或编辑模式有额外限制
可用选项:
16:9, 9:16, 1:1, 4:3, 3:4, 21:9, adaptive 输出分辨率
可用选项:
480p, 720p, 1080p, 4k 参考图片,可作为图生视频或多模态参考素材
Maximum array length:
9带角色的参考图;不能与 image_urls 同时传入
Maximum array length:
9Show child attributes
Show child attributes
参考视频地址;实际时长与格式还需符合模型的素材限制
Maximum array length:
3参考音频地址;实际时长与格式还需符合模型的素材限制
Maximum array length:
3随机种子
是否生成配套音频
请求生成尾帧;当前网关任务结果只提供主视频文件,不公开尾帧
可选联网搜索工具,如 [{"type":"web_search"}]
Show child attributes
Show child attributes