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。