Skip to main content
POST
Generate image

Authorizations

Authorization
string
header
required

Bearer authentication using API key

Body

application/json

Request payload

Request format for image generation models

model
enum<string>
required

Model name to use for the request

Available options:
alibaba/z-image-spicy-pro-t2i
prompt
string
required

Text prompt for generation

size
enum<string>
required

Output size. Choose a preset, or set to "custom" to specify an arbitrary size; the width and height fields only take effect when size is "custom".

Available options:
1024x768,
768x1024,
1024x1024,
1024x1536,
1536x1024,
2560x1440,
1440x2560,
custom
height
integer

Height of the output. Only takes effect when size is "custom".

prompt_expansion_enable
boolean
default:true

Whether to automatically expand the prompt for better results

seed
integer

Random seed for generation

Required range: -1 <= x <= 9999999999
width
integer

Width of the output. Only takes effect when size is "custom".

Response

200 - application/json

Successful response

Standard async task creation response

code
string
required

Status code returned by the service

Example:

"success"

data
object
required

Response payload containing task details

message
string
required

Additional information about the request result

fail_code
string

Failure code if the task submission did not succeed