Image models
Qwen Image Edit
On this page
Qwen Image Edit — fast, high-fidelity AI image generation & editing.
| modelId | qwen-image-edit |
| Modality | image |
| Pricing | See this model on the Pricing page for the current per-call price (with your markup). |
Operations
| Operation | modelId | Endpoint | Required input |
|---|---|---|---|
| Default | qwen-image-edit | POST /api/v1/generate | prompt, image_url |
| Poll task | — | GET /api/v1/task/{id}?model=qwen-image-edit | — |
Input parameters
| Field | Type | Required | Values / example |
|---|---|---|---|
| prompt | string | Yes | The prompt to generate the image with Max 2000 characters. (default: Enhance into a rich cinematic color grade with soft golden rim light, refined detail, and natural depth.) |
| image_url | string | Yes | The URL of the image to edit. (image URL) |
| acceleration | string | No | Acceleration level for image generation. Options: 'none', 'regular'. Higher acceleration increases speed. 'regular' balances speed and quality. Default value: "none" (options: none | regular | high) (default: none) |
| image_size | string | No | The size of the generated image. Default value: landscape_4_3 (options: square | square_hd | portrait_4_3 | portrait_16_9 | landscape_4_3 | landscape_16_9) (default: landscape_4_3) |
| num_inference_steps | number | No | The number of inference steps to perform. Default value: 30 (range 2-49) (default: 25) |
| seed | number | No | The same seed and the same prompt given to the same version of the model will output the same image every time. |
| guidance_scale | number | No | The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. Default value: 4 (range 0-20) (default: 4) |
| sync_mode | boolean | No | If set to true, the function will wait for the image to be generated and uploaded before returning the response. This will increase the latency of the function but it allows you to get the image directly in the response without going through the CDN. (true/false) (default: false) |
| num_images | string | No | Options: 1 | 2 | 3 | 4 |
| enable_safety_checker | boolean | No | If set to true, the safety checker will be enabled. Default value: true (true/false) (default: true) |
| output_format | string | No | The format of the generated image. Default value: "png" (options: jpeg | png) (default: png) |
| negative_prompt | string | No | The negative prompt for the generation Default value: " " Max 500 characters. (default: blurry, ugly) |
| nsfw_checker | boolean | No | A configurable parameter. Defaults to true in the Playground. (true/false) (default: true) |
Example request
bash
curl -X POST https://you.bot/api/v1/generate \
-H "Authorization: Bearer $YOUBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"modelId":"qwen-image-edit","input":{"prompt":"A photorealistic portrait of a red fox in a snowy forest, soft morning light, shallow depth of field, 85mm.","image_url":"https://example.com/input.jpg","acceleration":"none","image_size":"landscape_4_3","num_inference_steps":25,"seed":1,"guidance_scale":4,"sync_mode":false,"num_images":"1","enable_safety_checker":true,"output_format":"png","negative_prompt":"blurry, low quality, distorted, watermark, text","nsfw_checker":true}}'