# Qwen Image Lora API Complete API reference for Qwen Image Lora image editing models by Alibaba. ## Model Variants This API supports one model variant: | Model | ID | Description | |-------|-----|-------------| | **Qwen Image Lora Edit** | `qwen-image-lora-edit` | Image editing from a reference image and prompt | ## Quick Comparison | Feature | Qwen Image Lora Edit | |---------|---------------------| | Input | Image + Text prompt | | Output | Edited image | | Image Input | Required, exactly one image | | Aspect Ratios | Not supported (source-driven) | | `seed` | Optional | ## Qwen Image Lora Edit ### Endpoint ``` POST /api/v1/image/task ``` ### Request Parameters #### Required | Parameter | Type | Description | |-----------|------|-------------| | `model_name` | string | Must be `"qwen-image-lora-edit"` | | `prompt` | string | Description of the desired edit | | `image_url_list` | string[] | Required reference image URL array. Must contain exactly one image URL. | #### Optional | Parameter | Type | Description | |-----------|------|-------------| | `seed` | number | Random seed in range `[0, 2147483647]`. Use `null` or `0` for random generation. | ### Example Request ```javascript 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; ``` ## Response Format Submit response: ```json { "code": 0, "message": "success", "data": { "task_id": "{task_id}", "response_url": "https://api.flaq.ai/api/v1/image/{task_id}", "task_status": "submitted" } } ``` Poll with `GET /api/v1/image/{task_id}`. Task statuses: `submitted`, `processing`, `succeed`, `failed`. ## Best Practices - Use clear edit instructions such as background replacement, hairstyle changes, or object removal. - Provide a high-quality source image with a clearly visible subject. - Use a fixed `seed` when comparing multiple prompt variations on the same input.