Skip to main content
POST

Authorizations

Authorization
string
header
required

API Key authentication. Format: Bearer YOUR_API_KEY.

Body

application/json
prompt
string
required

Image description text, supports Chinese and English

Required string length: 1 - 4500
Example:

"A serene Japanese garden with cherry blossoms"

negative_prompt
string

Negative prompt describing unwanted content

Maximum string length: 500
Example:

"blurry, low quality"

size
string

Output image resolution as widthheight (e.g. 10241024). Optional; when omitted the model auto-selects. Total pixels should stay within 512512 to 20482048.

Pattern: ^\d+\*\d+$
Example:

"1024*1024"

n
integer
default:1

Number of images to generate (1-6)

Required range: 1 <= x <= 6
Example:

1

seed
integer

Random seed for reproducible results

Required range: 0 <= x <= 2147483647
Example:

42

prompt_extend
boolean
default:true

Enable intelligent prompt rewriting

Example:

true

Response

Task submitted successfully

code
integer
required

Response code, 0 indicates success

Example:

0

message
string
required

Response message

Example:

"success"

data
object
required

Detailed data about the submitted asynchronous task.