Skip to main content
POST
Generate an image with Qwen Image 2.1's parameters

Authorizations

Authorization
string
header
required

An organization API key (sk_studio_…) from Studio → API. Only the owner and admins create keys.

Headers

Idempotency-Key
string
required

Any unique string of 1–255 printable ASCII characters, with no spaces, such as a UUID. A retry with the same key and body returns the original generation and is never charged twice; the same key with a different body is refused.

Required string length: 1 - 255
Pattern: ^[\x21-\x7e]{1,255}$
Quote-Id
string<uuid>

Binds the price of a quote from POST /quotes.

Body

application/json

Qwen Image 2.1's own request body (reAPI), at the top level. Fields not listed are refused by name with 422 unsupported_parameter. Studio sets content_filter: true.

model
string
required
Allowed value: "qwen-image-2.1"
prompt
string
required

What to draw. Sent exactly as written.

Required string length: 1 - 4000
Pattern: \S
aspect_ratio
enum<string>
default:1:1

Output shape.

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

Output tier; sets the price.

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

Transparent needs png or webp output.

Available options:
opaque,
transparent
output_format
enum<string>
default:png

Image file format.

Available options:
png,
webp,
jpeg
enhance_prompt
boolean
default:true

Let the model expand the prompt.

seed
integer

Fix the seed for repeatable output.

Required range: 0 <= x <= 2147483647

Response

A retry with the same Idempotency-Key whose generation already finished.

id
string<uuid>
required
status
enum<string>
required
Available options:
queued,
running,
succeeded,
failed
outputs
object[]
required
billing
object
required

Held at the maximum before dispatch; on success, charged the provider's receipt (never above the maximum); on failure, released in full.

object
any
type
enum<string>
Available options:
image,
video
model
string
route
string
created_at
string<date-time>
finished_at
string<date-time> | null
error
object | null