Pixverse V6 API
Pixverse V6 视频生成模型的完整 API 参考。所有变体都使用统一的视频任务端点。
模型变体
快速对比
Text-to-video 模型支持以下宽高比:21:9, 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3。
Pixverse V6 Text to Video
端点
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: 'pixverse-v6-text-to-video',
prompt: 'A cinematic street scene at night with neon reflections',
duration: 8,
resolution: '1080p',
aspect_ratio: '16:9',
sound: true,
}),
});
const { data } = await response.json();
const taskId = data.task_id;
Pixverse V6 Image to Video
请求参数
必填
可选
请求示例
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: 'pixverse-v6-image-to-video',
prompt: 'Fluid camera pan; maintain subject identity',
duration: 6,
resolution: '720p',
image_url: 'https://example.com/first-frame.jpg',
sound: true,
}),
});
const { data } = await response.json();
const taskId = data.task_id;
Pixverse V6 Transition
在首帧和末帧关键帧图片之间生成运动。支持可选的 negative prompting 和 seed。
请求参数
必填
可选
请求示例
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: 'pixverse-v6-transition',
prompt: 'Seamless blend with natural lighting continuity',
duration: 6,
resolution: '720p',
image_url: 'https://example.com/start.jpg',
image_end_url: 'https://example.com/end.jpg',
sound: true,
negative_prompt: 'blur, watermark, text overlay',
seed: 0,
}),
});
const { data } = await response.json();
const taskId = data.task_id;
Pixverse V6 Extend
延续现有片段。提供源视频 URL 和描述故事应如何推进的提示词。
请求参数
必填
可选
请求示例
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: 'pixverse-v6-extend',
prompt: 'Continue the walk into the forest clearing',
duration: 5,
resolution: '720p',
video_url: 'https://example.com/source-clip.mp4',
sound: false,
negative_prompt: 'low quality, jitter',
seed: 0,
}),
});
const { data } = await response.json();
const taskId = data.task_id;
响应格式
初始响应
{
"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: 视频生成失败
最佳实践
- Extend:使用干净、稳定的源视频,帮助模型在没有伪影的情况下延续运动。
- Transition:需要可重复的转场测试时,将
negative_prompt 与 seed 搭配使用。
- 分辨率:让
resolution 匹配交付目标;更高分辨率需要更长处理时间。
- 轮询:每 5–10 秒轮询一次,直到
task_status 为 succeed 或 failed。