Beta Qwen Image Generation & Editing API
POSThttps://api.jiasmart.asia/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 offers stronger details and tiered 1K/2K options.', '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 prompt or editing instruction. In editing mode, please also provide image_urls.', '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; billing is based on 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, with a pixel area 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; the agent is for text-to-image generation only.', 'en': 'Prompt enhancement mode; agent is text-to-image only.'}
Please select
enable_thinkingboolean
{'zh-cn': '是否启用增强推理。', 'en': 'Whether to enable enhanced reasoning.'}
Please select
negative_promptstring
{'zh-cn': 'Content not desired 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': '设为 true 时立即返回 task_id,并通过 /qwen-image/tasks 查询终态;任务查询不重复计费。', 'en': 'When set to true, a task_id is returned immediately, and the final status can be queried through /qwen-image/tasks; task queries are not charged again.'}
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.