Vidu Q3 API
Tài liệu tham chiếu API đầy đủ cho các mô hình tạo video Vidu Q3 của Vidu.
Các Biến Thể Mô Hình
API này hỗ trợ bảy biến thể mô hình:
So Sánh Nhanh
Vidu Q3 Text to Video (Turbo & Pro)
Endpoint
POST /api/v1/video/task
Tham Số Yêu Cầu
Bắt buộc
Tùy chọn
Ví Dụ Yêu Cầu
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 Image to Video (Turbo & Pro)
Tham Số Yêu Cầu
Bắt buộc
Tùy chọn
Ví Dụ Yêu Cầu
{
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 Start-End Frame (Turbo & Pro)
Tạo video chuyển tiếp giữa khung hình đầu và khung hình cuối.
Tham Số Yêu Cầu
Bắt buộc
Tùy chọn
Ví Dụ Yêu Cầu
{
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 Tham Chiếu Thành Video
Tạo video từ một đến bốn hình ảnh tham chiếu theo thứ tự. Không hỗ trợ đầu vào âm thanh và video tham chiếu.
Tham Số Yêu Cầu
Bắt buộc
Placeholder Tham Chiếu @ (AT)
Tính năng tham chiếu @ (AT) liên kết hình ảnh tham chiếu với prompt thông qua các placeholder <<<image_N>>> được đánh số. Số thứ tự bắt đầu từ 1 và tuân theo thứ tự của mảng images.
Tùy chọn
Tham số không được hỗ trợ: Mô hình này không hỗ trợ audios hoặc videos.
Ví Dụ Yêu Cầu
{
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
}
Ví Dụ Yêu Cầu Reference-to-Video @ (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
}
Định Dạng Phản Hồi
Phản Hồi Ban Đầu
{
"code": 0,
"message": "success",
"data": {
"task_id": "{task_id}",
"response_url": "https://api.flaq.ai/api/v1/video/{task_id}",
"task_status": "submitted"
}
}
Phản Hồi Polling
Thực hiện polling GET /api/v1/video/{taskId} để kiểm tra trạng thái:
{
"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"
}
]
}
}
}
Giá Trị Trạng Thái
submitted: Tác vụ đã được chấp nhận và đang chờ xử lý
processing: Đang tạo video
succeed: Tạo video hoàn tất
failed: Tạo video thất bại
Thời Gian Xử Lý
- Turbo: 1-3 phút
- Pro: 3-6 phút
Thực Hành Tốt Nhất
- Lựa Chọn Cấp: Dùng Turbo để thử nghiệm nhanh, Pro cho sản phẩm cuối
- Viết Prompt: Mô tả cả chuyển động của chủ thể và máy quay để có kết quả rõ ràng hơn
- Đầu vào hình ảnh: Dùng ảnh nguồn rõ nét, độ phân giải cao cho image-to-video và start-end
- Lập kế hoạch độ phân giải: Chọn
540p, 720p hoặc 1080p theo tốc độ, chất lượng và ngân sách credit
- Hình ảnh tham chiếu: Với Reference-to-Video, hãy gửi 1-4 hình ảnh theo thứ tự có chủ ý và tham chiếu nhất quán trong prompt
- Phương tiện không được hỗ trợ: Không gửi
audios hoặc videos đến mô hình Reference-to-Video