创建视频生成任务
Endpoint
POST /v1/video/generations
Header 参数
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
Authorization | string | No | Bearer {your_token} |
请求体参数
| Field | Type | Required | Title | Description |
|---|---|---|---|---|
model | string | Yes | 模型名称 | “wan2.6-video-720p”,“wan2.6-video-1080p” |
prompt | string | Yes | 提示词 | |
image | string | Yes | 参考图 | |
duration | string | Yes | 秒数 | |
size | string | Yes | 产出视频尺寸 | "1280720", "7201280", "19201080", "10801920", 注意:文生视频时可选size控制横版竖版,图生视频时size参数无效,但仍然可以传入,但是产出视频横版竖版跟随参考图 |
extra_body | object | Yes |
请求示例
示例 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
}
}'
响应字段
| Field | Type | Required | Title | Description |
|---|
响应示例
成功
{
"id": "task_xxxxxxxxxxxxxxxxxxxx",
"task_id": "task_xxxxxxxxxxxxx",
"object": "video.generation.job",
"model": "wan2.6-video-1080p",
"status": "in_progress",
"progress": 5,
"created_at": 1773984104
}