Skip to content
Docs menu

Image models

Qwen Image Edit

On this page

Qwen Image Edit — fast, high-fidelity AI image generation & editing.

modelIdqwen-image-edit
Modalityimage
PricingSee this model on the Pricing page for the current per-call price (with your markup).

Operations

OperationmodelIdEndpointRequired input
Defaultqwen-image-editPOST /api/v1/generateprompt, image_url
Poll taskGET /api/v1/task/{id}?model=qwen-image-edit

Input parameters

FieldTypeRequiredValues / example
promptstringYesThe 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_urlstringYesThe URL of the image to edit. (image URL)
accelerationstringNoAcceleration 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_sizestringNoThe 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_stepsnumberNoThe number of inference steps to perform. Default value: 30 (range 2-49) (default: 25)
seednumberNoThe same seed and the same prompt given to the same version of the model will output the same image every time.
guidance_scalenumberNoThe 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_modebooleanNoIf 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_imagesstringNoOptions: 1 | 2 | 3 | 4
enable_safety_checkerbooleanNoIf set to true, the safety checker will be enabled. Default value: true (true/false) (default: true)
output_formatstringNoThe format of the generated image. Default value: "png" (options: jpeg | png) (default: png)
negative_promptstringNoThe negative prompt for the generation Default value: " " Max 500 characters. (default: blurry, ugly)
nsfw_checkerbooleanNoA 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}}'