Beta Qwen Image Generation & Editing API
https://api2.yujuntc.fun/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 detail 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 reference image URL array, supports 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': 'Number of output images, 1–6.', 'en': 'Number of output images, from 1 to 6.'}
sizestring
{'zh-cn': 'Output dimensions, the pixel area must be between 512×512 and 2048×2048.', 'en': 'Output dimensions with pixel area 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.', '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': '是否添加水印。', 'en': 'Whether to add a watermark.'}
Please select
callback_urlstring
{'zh-cn': 'Asynchronous completion callback URL.', 'en': 'Callback URL for asynchronous completion.'}
asyncboolean
{'zh-cn': 'When set to true, returns a task_id immediately, and query the terminal state through /qwen-image/tasks; task queries are not charged 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
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.