Vidu Q3 API
Vidu Q3 视频生成模型的完整 API 参考文档。
模型版本
此 API 支持七种模型变体:
快速对比
Vidu Q3 文本生成视频(Turbo & Pro)
接口地址
POST /api/v1/video/task
请求参数
必填参数
可选参数
请求示例
const response = await fetch('https://api.flaq.ai/api/v1/video/task', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model_name: 'viduq3-turbo-text-to-video',
prompt: 'A cinematic drone shot over misty mountains at sunrise',
aspect_ratio: '16:9',
resolution: '720p',
duration: 5,
sound: true,
bgm: false,
style: 'general',
seed: 42
})
});
const { data } = await response.json();
const taskId = data.task_id;
Vidu Q3 图片生成视频(Turbo & Pro)
请求参数
必填参数
可选参数
请求示例
{
model_name: 'viduq3-pro-image-to-video',
image_url: 'https://example.com/image.jpg',
prompt: 'Smooth pan across the scene with natural motion',
aspect_ratio: '16:9',
resolution: '720p',
duration: 5,
sound: true,
bgm: false,
seed: 42
}
Vidu Q3 首尾帧视频生成(Turbo & Pro)
根据首帧和尾帧图片生成过渡视频。
请求参数
必填参数
可选参数
请求示例
{
model_name: 'viduq3-pro-start-end-frame',
image_url: 'https://example.com/start.jpg',
image_end_url: 'https://example.com/end.jpg',
prompt: 'Smooth transition from day to night with stars appearing',
aspect_ratio: '16:9',
resolution: '720p',
duration: 5,
sound: true,
bgm: false,
seed: 42
}
Vidu Q3 参考视频生成
根据一至四张按顺序排列的参考图像生成视频。不支持参考音频和参考视频输入。
请求参数
必填参数
@ (AT) 引用占位符
@ (AT) 引用功能通过带编号的 <<<image_N>>> 占位符将参考图像关联到提示词。编号从 1 开始,并遵循 images 数组的顺序。
可选参数
不支持的参数: 此模型不支持 audios 或 videos。
请求示例
{
model_name: 'viduq3-reference-to-video',
prompt: 'Keep the character from image one and the jacket details from image two while walking through a rainy city',
images: [
'https://example.com/character-reference.jpg',
'https://example.com/outfit-reference.jpg'
],
aspect_ratio: '9:16',
resolution: '1080p',
duration: 8,
sound: true,
seed: 42
}
@ (AT) 参考视频生成请求示例
{
model_name: 'viduq3-reference-to-video',
prompt: 'Keep the character from <<<image_1>>> wearing the coat from <<<image_2>>> while entering the rainy city shown in <<<image_3>>>, then return to a close-up of <<<image_1>>>',
images: [
'https://example.com/character-reference.jpg',
'https://example.com/outfit-reference.jpg',
'https://example.com/city-reference.jpg'
],
aspect_ratio: '9:16',
resolution: '1080p',
duration: 8,
sound: true,
seed: 42
}
响应格式
初始响应
{
"code": 0,
"message": "success",
"data": {
"task_id": "{task_id}",
"response_url": "https://api.flaq.ai/api/v1/video/{task_id}",
"task_status": "submitted"
}
}
轮询响应
轮询 GET /api/v1/video/{taskId} 查询任务状态:
{
"code": 0,
"message": "success",
"data": {
"task_id": "{task_id}",
"response_url": "https://api.flaq.ai/api/v1/video/{task_id}",
"task_status": "succeed",
"task_status_msg": null,
"task_result": {
"videos": [
{
"url": "https://example.com/generated-video.mp4"
}
]
}
}
}
状态值
submitted:任务已提交,等待处理
processing:视频生成中
succeed:视频生成完成
failed:视频生成失败
处理时间
最佳实践
- 档位选择:快速迭代使用 Turbo,最终输出使用 Pro
- 提示词编写:同时描述主体动作和镜头运动,结果会更稳定
- 图片输入:图生视频和首尾帧场景尽量使用清晰、高分辨率的源图
- 分辨率规划:根据速度、质量和额度预算选择
540p、720p 或 1080p
- 参考图像:Reference-to-Video 请按预定顺序提交 1-4 张图像,并在提示词中一致引用
- 不支持的媒体:请勿向 Reference-to-Video 模型发送
audios 或 videos