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

Whether to enable intelligent prompt rewriting. Default true (recommended). When enabled, the model rewrites the positive prompt using the mode specified by prompt_extend_mode; most effective for short or simple prompts.

Example:

true

prompt_extend_mode
enum<string>
default:direct

Prompt rewrite mode when prompt_extend is true. Default direct. direct: Direct Prompt Enhancement (DPE), suitable for most scenarios (T2I and I2I). agent: Agent Prompt Enhancement (APE), finer rewrite; text-to-image (T2I) only.

Available options:
direct,
agent
Example:

"direct"

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.