Skip to main content
POST
Qwen-Image 2.1

Headers

Authorization
string

Body

application/json
model
enum<string>
required

Model name. Must be qwen-image-2-1.

Available options:
qwen-image-2-1
prompt
string

What to generate, or the edit instruction. Refer to reference images as <image1><image10>. Required, except for background removal (one image in image_list with background: transparent). Any language is accepted, and text you ask for in the image is rendered as written.

Maximum string length: 4000
image_list
object[]

Optional reference images for editing, [{"url": "https://..."}]. Up to 10 at 1K, up to 3 at 2K. The array order is the <imageN> order; the first image is the one being edited. Reference images do not change the price.

Required array length: 1 - 10 elements
ratio
enum<string>
default:auto

Aspect ratio. auto follows the first reference image when editing and means 1:1 for text to image.

Available options:
auto,
1:1,
2:3,
3:2,
3:4,
4:3,
9:16,
16:9,
21:9
image_size
enum<string>
default:1K

Resolution tier, also the price tier. 1K is about 1 megapixel, 2K about 4 megapixels (native). Case-insensitive.

Available options:
1K,
2K
background
enum<string>
default:opaque

transparent returns a PNG with an alpha channel. Does not affect pricing.

Available options:
opaque,
transparent
seed
integer

Optional. Fixing the seed makes results more reproducible.

Required range: 0 <= x <= 2147483647
custom_callback_url
string<uri>

Optional. A publicly accessible HTTPS URL. When the task status changes (processing / success / failed), GoEnhance sends a POST request to this URL. The request body is identical to the response of GET /api/v1/jobs/detail. If your server does not respond with HTTP 200, the notification is retried up to 3 times, with a 3-second timeout per attempt.

Example:

"https://your-server.com/goenhance/callback"

Response

code
integer
required
msg
string
required
data
object
required