跳到主要内容

Wan 2.6 R2V 系列创建视频任务

本页示例中的 {BASE_URL} 表示 https://api.uniall.ai

Endpoint

POST /v1/video/generations

请求体参数

FieldTypeRequiredTitleDescription
modelstringNoExample fieldAppears in a request example; no separate field description is provided.
promptstringNoExample fieldAppears in a request example; no separate field description is provided.
videosarrayNoExample fieldAppears in a request example; no separate field description is provided.
sizestringNoExample fieldAppears in a request example; no separate field description is provided.
durationnumberNoExample fieldAppears in a request example; no separate field description is provided.
extra_bodyobjectNoExample fieldAppears in a request example; no separate field description is provided.
imagesarrayNoExample fieldAppears in a request example; no separate field description is provided.

请求示例

示例 1:视频参考

{
"model": "wan2.6-r2v-flash-720p-audio",
"prompt": "保持相同主体身份与电影感风格,生成一段更快节奏的新镜头。",
"videos": [
"https://example.com/reference-shot-1.mp4"
],
"size": "1280*720",
"duration": 5,
"extra_body": {
"negative_prompt": "watermark, blur, flicker",
"audio": "https://example.com/guide-audio.mp3",
"shot_type": "single",
"enable_prompt_expansion": false,
"seed": -1
}
}
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.6-r2v-flash-720p-audio",
"prompt": "保持相同主体身份与电影感风格,生成一段更快节奏的新镜头。",
"videos": [
"https://example.com/reference-shot-1.mp4"
],
"size": "1280*720",
"duration": 5,
"extra_body": {
"negative_prompt": "watermark, blur, flicker",
"audio": "https://example.com/guide-audio.mp3",
"shot_type": "single",
"enable_prompt_expansion": false,
"seed": -1
}
}'

示例 2:多图参考

{
"model": "wan2.6-r2v-flash-1080p-silent",
"prompt": "保持相同产品身份与风格,生成一段干净的营销视频。",
"images": [
"https://example.com/ref-1.png",
"https://example.com/ref-2.png"
],
"size": "1920*1080",
"duration": 10,
"extra_body": {
"negative_prompt": "watermark, blur",
"shot_type": "multi",
"enable_prompt_expansion": true,
"seed": 42
}
}
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.6-r2v-flash-1080p-silent",
"prompt": "保持相同产品身份与风格,生成一段干净的营销视频。",
"images": [
"https://example.com/ref-1.png",
"https://example.com/ref-2.png"
],
"size": "1920*1080",
"duration": 10,
"extra_body": {
"negative_prompt": "watermark, blur",
"shot_type": "multi",
"enable_prompt_expansion": true,
"seed": 42
}
}'

响应字段

FieldTypeRequiredTitleDescription

响应示例

示例 1

{}

任务状态与结果

创建成功后保存 idtask_id,随后调用 GET /v1/videos/{task_id},直到任务进入 completedfailed。统一的轮询间隔、状态字段、错误结构、结果地址和鉴权下载方式见视频生成概览