Vidu Q3 API
Vidu Q3 影片生成模型的完整 API 參考文件。
模型版本
此 API 支援七種模型變體:
快速對比
Vidu Q3 文字生成影片(Turbo & Pro)
API 位址
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