Wan 2.7 Lora API
Alibaba Wan 2.7 Lora 圖生影片生成的完整 API 參考。
模型版本
此 API 支援一個模型版本:
快速比較
Wan 2.7 Lora Image 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: 'wan-2.7-lora-image-to-video',
prompt: 'The girl is dancing',
image_url: 'https://example.com/source-image.jpg',
resolution: '720p',
duration: 5,
audio_url: 'https://example.com/background-audio.mp3',
seed: 4,
negative_prompt: 'other people'
})
});
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/{task_id} 輪詢。任務狀態包括:submitted、processing、succeed、failed。
最佳實務
- 使用清楚描述主體動作和鏡頭行為的動作提示詞。
- 提供主體明確、畫面乾淨的首幀圖像。
- 使用
negative_prompt 減少場景中不需要的瑕疵或多餘主體。