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 减少场景中不需要的瑕疵或多余主体。