Beta Qwen Image Generation & Editing API
POSThttps://api.acedata.cloud/qwen-image/images

Generate images or edit 1–3 references with Qwen Image, including batch outputs, synchronous responses, asynchronous tasks, and callbacks.

Request Headers

acceptstring
Specify the format of the response returned by the server. If not specified, the default format is `application/json`.
Please select
authorizationstring
Bearer token

Request Body

modelstringRequired parameter
{'zh-cn': 'Model name. qwen-image-3.0 is suitable for cost-effective batch creation; qwen-image-3.0-pro provides stronger details and 1K/2K tiers.', 'en': 'Model ID. Use qwen-image-3.0 for efficient batch creation or qwen-image-3.0-pro for higher detail with 1K/2K pricing.'}
promptstringRequired parameter
{'zh-cn': 'Image generation description or editing instruction. Please also provide image_urls in edit mode.', 'en': 'Generation prompt or editing instruction. Include image_urls for edit mode.'}
image_urlsarray
{'zh-cn': 'Optional array of reference image URLs, supporting 1–3 images; billed according to the actual number of input images.', 'en': 'Optional array of 1–3 reference image URLs, billed by the actual input image count.'}
ninteger
{'zh-cn': '输出图片数量,1–6 张。', 'en': 'Number of output images, 1–6.'}
sizestring
{'zh-cn': '输出尺寸,像素面积需在 512×512 至 2048×2048 之间。', 'en': 'Output dimensions, with the pixel area required to be between 512×512 and 2048×2048.'}
prompt_extendboolean
{'zh-cn': 'Whether to enhance the prompt.', 'en': 'Whether to enhance the prompt.'}
Please select
prompt_extend_modestring
{'zh-cn': 'Prompt enhancement mode; agent is only used for text-to-image generation.', 'en': 'Prompt enhancement mode; agent is text-to-image only.'}
Please select
enable_thinkingboolean
{'zh-cn': 'Whether to enable enhanced reasoning.', 'en': 'Whether to enable enhanced reasoning.'}
Please select
negative_promptstring
{'zh-cn': 'Content that is not desired to appear in the image.', 'en': 'Content to exclude from the image.'}
seedinteger
{'zh-cn': 'Random seed.', 'en': 'Random seed.'}
watermarkboolean
{'zh-cn': 'Whether to add a watermark.', 'en': 'Whether to add a watermark.'}
Please select
callback_urlstring
{'zh-cn': 'Callback URL for asynchronous completion.', 'en': 'Callback URL for asynchronous completion.'}
asyncboolean
{'zh-cn': 'When set to true, immediately returns task_id, and query the terminal state through /qwen-image/tasks; task queries are not billed repeatedly.', 'en': 'When true, returns a task_id immediately. Retrieve the terminal result through /qwen-image/tasks without an additional generation charge.'}
Please select

Response

Integration guide

Shell

Python

JavaScript

Java

Go

PHP

Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.

Qwen Image
Allow Use General Balance

When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.