Qwen Image Lora API
Alibaba Qwen Image Lora 圖像編輯模型的完整 API 參考。
模型版本
此 API 支援一個模型版本:
快速比較
Qwen Image Lora Edit
端點
POST /api/v1/image/task
請求參數
必需
可選
請求範例
const response = await fetch('https://api.flaq.ai/api/v1/image/task', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model_name: 'qwen-image-lora-edit',
prompt: 'Make the hair longer and more natural',
image_url_list: ['https://example.com/source-image.jpg'],
seed: 42
})
});
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/image/{task_id}",
"task_status": "submitted"
}
}
使用 GET /api/v1/image/{task_id} 輪詢。任務狀態包括:submitted、processing、succeed、failed。
最佳實務
- 使用清晰的編輯指令,例如替換背景、更改髮型或移除物體。
- 提供主體清晰可見的高品質來源圖像。
- 在同一輸入上比較多個提示詞變體時,使用固定的
seed。