Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
string
required

Required. Use a model ID or available alias returned by Get Models.

Minimum string length: 1
Examples:

"bailian/qwen-image-3.0-pro"

"qwen-image-3.0-pro"

prompt
string
required

Required. Describe the image to generate.

Minimum string length: 1
size
string
default:1024x1024

Output size as WIDTHxHEIGHT, or auto for the model default. Supported sizes depend on the selected model.

Pattern: ^(auto|[1-9][0-9]*x[1-9][0-9]*)$
Examples:

"1024x1024"

"2048x2048"

"1536x1024"

images
(string | object)[]

Optional reference images for image-to-image generation. Omit for text-to-image generation. Image limits depend on the selected model.

Required array length: 1 - 3 elements
Minimum string length: 1
prompt_extend
boolean
default:true

Optional. Whether to enable intelligent prompt word rewriting.

prompt_extend_mode
enum<string>
default:direct

Optional. Prompt word rewriting mode. Direct supports Vincentian diagrams and Tusheng diagrams; agent only supports Vincentian diagrams.

Available options:
direct,
agent
enable_thinking
boolean
default:true

Optional. Whether to enable thinking mode. When set to true prompt_extend cannot be turned off explicitly.

negative_prompt
string

Optional. Describe what you don't want to appear in the results.

seed
integer

Optional. Random seed. Fixed seeds improve result reproducibility but do not guarantee pixel-level consistency.

Required range: 0 <= x <= 2147483647
watermark
boolean
default:false

Optional. Whether to add Qwen-Image watermark in the lower right corner of the generated image.

response_format
enum<string>
default:url

Response format: url returns image URLs; b64_json returns Base64 image data.

Available options:
b64_json,
url

Response

200 - application/json

The image was generated successfully. The gateway has downloaded the upstream temporary image and converted it to Base64 without the data URL prefix.

created
integer<int64>
required

The Unix timestamp (in seconds) when the gateway completed response conversion.

Required range: x >= 0
background
string
required

The current Qwen path is fixed to return opaque.

Allowed value: "opaque"
data
object[]
required

Generate a list of results.

Minimum array length: 1
output_format
enum<string>

The format inferred by the gateway based on the Content-Type of the downloaded image. Omitted when no recognized type is provided by the upstream.

Available options:
png,
jpeg,
webp
size
string

Actual or requested output size. Omitted when neither the request nor the upstream response provides a size.

Pattern: ^[1-9][0-9]*x[1-9][0-9]*$