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. Maximum 10000 characters. We recommend keeping the prompt under 600 words. Excessively long prompts may scatter information, causing the model to overlook details and focus only on major elements, which can result in missing details in the generated image.

Required string length: 1 - 10000
Example:

"A futuristic city at sunset, ultra detailed"

size
string
default:1024x1024

Image size in format 'widthxheight'. Total pixels must be within [1280x720(921,600), 4,624,220] and aspect ratio within [1/16, 16], corresponding to the official 1K/2K resolution levels (3K/4K not supported). Recommended 2K sizes: 2048x2048 (1:1), 2816x1584 (16:9), 2368x1776 (4:3).

Example:

"2048x2048"

optimize_prompt_mode
enum<string>
default:standard

Prompt optimization mode. 'standard': higher quality with longer generation time. 'fast': faster generation with slightly lower quality.

Available options:
standard,
fast
Example:

"standard"

output_format
enum<string>
default:jpeg

Output image format. Supported values: 'jpeg' and 'png'.

Available options:
jpeg,
png
Example:

"png"

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.