Wan 3.0 Video Prime 视频生成
curl --request POST \
--url https://ai.xbrod.com/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan3.0-video-prime",
"prompt": "湖面上的纸船,日出时的柔和光线",
"size": "16:9",
"duration": 5,
"resolution": "720P"
}
'import requests
url = "https://ai.xbrod.com/v1/videos"
payload = {
"model": "wan3.0-video-prime",
"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: 'wan3.0-video-prime',
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": "wan3.0-video-prime"
}Wan 3.0
Wan 3.0 Video Prime 视频生成
wan3.0-video-prime 的生成请求与响应。
POST
/
v1
/
videos
Wan 3.0 Video Prime 视频生成
curl --request POST \
--url https://ai.xbrod.com/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan3.0-video-prime",
"prompt": "湖面上的纸船,日出时的柔和光线",
"size": "16:9",
"duration": 5,
"resolution": "720P"
}
'import requests
url = "https://ai.xbrod.com/v1/videos"
payload = {
"model": "wan3.0-video-prime",
"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: 'wan3.0-video-prime',
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": "wan3.0-video-prime"
}模型选择
| 模型 ID | 请求地址 |
|---|---|
wan3.0-video-prime | POST /v1/videos |
主要参数
下表列出常用参数;媒体引用的组合限制以接口校验结果为准。| 字段 | 取值或限制 | 说明 |
|---|---|---|
model | wan3.0-video-prime | 模型 ID |
prompt | string | 内容描述;最多 20000 字符,使用素材时可选 |
duration | 2–30;默认 5 | 输出时长(秒);当前网关仅接受此区间的整数,不接受 -1 |
size | adaptive、16:9、4:3、1:1、3:4、9:16 | 视频宽高比;部分参考素材或编辑模式有额外限制 |
resolution | 480P、720P、1080P;默认 1080P | 输出分辨率;大小写不敏感 |
image_urls | 最多 10 项 | 参考图片;1 张可作首帧、2 张可作首尾帧;具体取决于 generation_type |
image_with_roles | 最多 10 项 | 带角色的参考图,可指定首帧、尾帧或参考图 |
video_urls | 最多 5 项 | 参考视频地址;实际时长与格式还需符合模型的素材限制 |
audio_urls | 最多 5 项 | 参考音频地址;实际时长与格式还需符合模型的素材限制 |
seed | 0–2147483647 | 随机种子 |
audio | true / false | 是否输出音轨;开关声音价格相同 |
watermark | true / false;默认 false | 添加水印 |
generation_type | frame、reference | 指定图片作为首尾帧或参考素材;两类素材不可混用 |
audio_url | string | 单条参考音频地址 |
file_url | string | 参考文档地址;不可与 link_url 同时使用 |
link_url | string | 参考网页地址;不可与 file_url 同时使用 |
素材规则
image_urls 可用于首尾帧或参考图,通过 generation_type 指定归属;image_with_roles 可明确首尾帧。file_url 与 link_url 不能同时提供。
参考视频与音频的时长、格式及总时长需符合当前模型的限制。
返回说明
提交后返回任务 ID,不表示视频已经完成。请在 任务查询 中用同一用户的密钥查询状态和结果。授权
本项目签发的 API 密钥,不是上游密钥
请求体
application/json
模型 ID
可用选项:
wan3.0-video-prime 内容描述;最多 20000 字符,使用素材时可选
输出时长(秒);当前网关仅接受此区间的整数,不接受 -1
必填范围:
2 <= x <= 30视频宽高比;部分参考素材或编辑模式有额外限制
可用选项:
adaptive, 16:9, 4:3, 1:1, 3:4, 9:16 输出分辨率;大小写不敏感
可用选项:
480P, 720P, 1080P 参考图片;1 张可作首帧、2 张可作首尾帧;具体取决于 generation_type
Maximum array length:
10带角色的参考图,可指定首帧、尾帧或参考图
Maximum array length:
10Show child attributes
Show child attributes
参考视频地址;实际时长与格式还需符合模型的素材限制
Maximum array length:
5参考音频地址;实际时长与格式还需符合模型的素材限制
Maximum array length:
5随机种子
必填范围:
0 <= x <= 2147483647是否输出音轨;开关声音价格相同
添加水印
指定图片作为首尾帧或参考素材;两类素材不可混用
可用选项:
frame, reference 单条参考音频地址
参考文档地址;不可与 link_url 同时使用
参考网页地址;不可与 file_url 同时使用