跳到主要内容
AI
MarkdownLLMs.txt

创建视频生成任务

Endpoint

POST /v1/video/generations

Header 参数

NameTypeRequiredDescriptionExample
AuthorizationstringNoBearer {your_token}

请求体参数

FieldTypeRequiredTitleDescription
modelstringYes模型名称“wan2.6-video-720p”,“wan2.6-video-1080p”
promptstringYes提示词
imagestringYes参考图
durationstringYes秒数
sizestringYes产出视频尺寸"1280720", "7201280", "19201080", "10801920", 注意:文生视频时可选size控制横版竖版,图生视频时size参数无效,但仍然可以传入,但是产出视频横版竖版跟随参考图
extra_bodyobjectYes

请求示例

示例 1

{
"model": "wan2.6-video-1080p",
"prompt": "日出",
"duration": 5,
"size": "1080*1920",
"extra_body": {
"negative_prompt": "不要出现模糊, 不要出现水印",
"shot_type": "multi",
"seed": -1
}
}
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.6-video-1080p",
"prompt": "日出",
"duration": 5,
"size": "1080*1920",
"extra_body": {
"negative_prompt": "不要出现模糊, 不要出现水印",
"shot_type": "multi",
"seed": -1
}
}'

响应字段

FieldTypeRequiredTitleDescription

响应示例

成功

{
"id": "task_xxxxxxxxxxxxxxxxxxxx",
"task_id": "task_xxxxxxxxxxxxx",
"object": "video.generation.job",
"model": "wan2.6-video-1080p",
"status": "in_progress",
"progress": 5,
"created_at": 1773984104
}