Pixverse C1 API
Pixverse C1 视频生成模型的完整 API 参考。所有变体都使用统一的视频任务端点。
模型变体
快速对比
Text-to-video 模型支持以下宽高比:21:9, 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3。
Pixverse C1 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-c1-text-to-video',
prompt: 'A drone shot over coastline at golden hour',
duration: 5,
resolution: '720p',
aspect_ratio: '16:9',
sound: true,
}),
});
const { data } = await response.json();
const taskId = data.task_id;
Pixverse C1 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-c1-image-to-video',
prompt: 'Slow zoom in; soft natural motion',
duration: 5,
resolution: '720p',
image_url: 'https://example.com/first-frame.jpg',
sound: false,
}),
});
const { data } = await response.json();
const taskId = data.task_id;
Pixverse C1 Transition
在首帧和末帧关键帧图片之间生成运动。
请求参数
必填
可选
请求示例
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-c1-transition',
prompt: 'Smooth cinematic morph between the two scenes',
duration: 6,
resolution: '720p',
image_url: 'https://example.com/start.jpg',
image_end_url: 'https://example.com/end.jpg',
sound: true,
}),
});
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: 视频生成失败
最佳实践
- 分辨率:使用
720p 或 1080p 在质量和生成时间之间取得平衡;使用 360p 或 540p 可更快迭代。
- 转场:使用清晰、光线充足的首帧和末帧,帮助模型可靠地插值运动。
- 音频:需要同步环境音时设置
sound;静音输出则省略或设为 false。
- 轮询:每 5–10 秒轮询一次,直到
task_status 为 succeed 或 failed。