跳到主要内容
AI
MarkdownLLMs.txt

创建视频任务(旧)

Endpoint

POST /v1/video/generations

Header 参数

NameTypeRequiredDescriptionExample
AuthorizationstringNoBearer {your_token}

请求体参数

FieldTypeRequiredTitleDescription
modelstringYes模型名称viduq3p-540p, viduq3p-720p, viduq3p-1080p, viduq3t-540p, viduq3t-720p, viduq3t-1080p
promptstringYes提示词只传prompt视为图生视频
imagestringYes参考图/首帧参考图只传image, 不传last_image, 视为图生视频
reference_image_urlsarrayYesmix模式参考图只有 mix模式生效,字符串数组:示例:[, "https://example.com/ref-1.png", "https://example.com/ref-2.png", ]
last_imagestringYes尾帧参考图同时传入image和last_image视为首尾帧生视频,不支持只传入last_image
aspect_ratiostringYes输出画幅比例文生视频有效;图生视频也可传入,但不保证影响结果
durationstringYes视频时长(秒)允许值:116
extra_bodyobjectYes扩展参数

请求示例

文生视频

{
"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
}
}'

响应字段

FieldTypeRequiredTitleDescription

响应示例

成功

{
"id": "task_xxxxx",
"task_id": "task_xxxxx",
"object": "video.generation.job",
"model": "viduq3p-540p",
"status": "queued",
"progress": 0,
"created_at": 1774507626
}