创建视频任务(旧)
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 | 模型名称 | viduq3p-540p, viduq3p-720p, viduq3p-1080p, viduq3t-540p, viduq3t-720p, viduq3t-1080p |
prompt | string | Yes | 提示词 | 只传prompt视为图生视频 |
image | string | Yes | 参考图/首帧参考图 | 只传image, 不传last_image, 视为图生视频 |
reference_image_urls | array | Yes | mix模式参考图 | 只有 mix模式生效,字符串数组:示例:[, "https://example.com/ref-1.png", "https://example.com/ref-2.png", ] |
last_image | string | Yes | 尾帧参考图 | 同时传入image和last_image视为首尾帧生视频,不支持只传入last_image |
aspect_ratio | string | Yes | 输出画幅比例 | 文生视频有效;图生视频也可传入,但不保证影响结果 |
duration | string | Yes | 视频时长(秒) | 允许值:1 到 16 |
extra_body | object | Yes | 扩展参数 |
请求示例
文生视频
{
"model": "viduq3p-720p",
"prompt": "电影感航拍镜头,日出时分掠过未来海滨城市,光线柔和,镜头缓慢推进。",
"aspect_ratio": "16:9",
"duration": 5,
"extra_body": {
"audio": false,
"seed": 42,
"bgm": false
}
}
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "viduq3p-720p",
"prompt": "电影感航拍镜头,日出时分掠过未来海滨城市,光线柔和,镜头缓慢推进。",
"aspect_ratio": "16:9",
"duration": 5,
"extra_body": {
"audio": false,
"seed": 42,
"bgm": false
}
}'
单图生视频
{
"model": "viduq3t-540p",
"prompt": "人物缓慢抬头并看向镜头,动作自然,镜头轻微前推。",
"image": "https://example.com/source.png",
"duration": 5,
"extra_body": {
"seed": 42
}
}
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "viduq3t-540p",
"prompt": "人物缓慢抬头并看向镜头,动作自然,镜头轻微前推。",
"image": "https://example.com/source.png",
"duration": 5,
"extra_body": {
"seed": 42
}
}'
首尾帧生视频
{
"model": "viduq3p-1080p-offpeak",
"prompt": "人物从正面自然转向侧面,身份保持稳定,动作连贯。",
"image": "https://example.com/head.png",
"last_image": "https://example.com/tail.png",
"duration": 6
}
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "viduq3p-1080p-offpeak",
"prompt": "人物从正面自然转向侧面,身份保持稳定,动作连贯。",
"image": "https://example.com/head.png",
"last_image": "https://example.com/tail.png",
"duration": 6
}'
参考图生视频
{
"model": "viduq3p-mix-720p",
"prompt": "A @Image1 walking through a beach in the visual style of @Image2",
"reference_image_urls": [
"https://example.com/ref-1.png",
"https://example.com/ref-2.png"
],
"aspect_ratio": "16:9",
"duration": 5,
"extra_body": {
"audio": false,
"seed": 42
}
}
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "viduq3p-mix-720p",
"prompt": "A @Image1 walking through a beach in the visual style of @Image2",
"reference_image_urls": [
"https://example.com/ref-1.png",
"https://example.com/ref-2.png"
],
"aspect_ratio": "16:9",
"duration": 5,
"extra_body": {
"audio": false,
"seed": 42
}
}'
响应字段
| Field | Type | Required | Title | Description |
|---|
响应示例
成功
{
"id": "task_xxxxx",
"task_id": "task_xxxxx",
"object": "video.generation.job",
"model": "viduq3p-540p",
"status": "queued",
"progress": 0,
"created_at": 1774507626
}