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

aspect_ratio
enum<string>
required

Aspect ratio

Available options:
1:1,
1:2,
2:1,
1:3,
3:1,
2:3,
3:2,
3:4,
4:3,
4:5,
5:4,
9:16,
16:9,
9:21,
21:9
images
string[]
required

Array of input images, which can be data URL or image URL

Required array length: 1 - 9 elements
model
enum<string>
required

Model name to use for the request

Available options:
alibaba/wan-2.7-image-i2i-spicy
prompt
string
required

Text prompt for generation

size
enum<string>
required

Size

Available options:
1k,
2k
bbox_list
integer[][][]

Interactive edit regions. Outer array aligns with input images; each image has a list of boxes; each box is [x1, y1, x2, y2].

Required array length: 4 elements
Required range: x >= 0
Example:
color_palette
object[]

Custom color theme

Example:
enable_sequential
boolean

Whether to enable sequential group image output. When enabled, state the number of images to generate in the prompt and describe what each image looks like, for example "generate 4 images: the first one is ..., the second one is ...". The n parameter then sets the maximum number of images to generate.

Example:

true

n
integer
default:1

Number of outputs to generate. When enable_sequential is true, this is the maximum number of images to generate; the actual count is determined by the number of images described in the prompt. Billing is based on the images actually generated, not this maximum

Required range: 1 <= x <= 12
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 <= 2147483647

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