Skip to main content
POST
Poll the returned task URL to retrieve the PNG. Query Task Result

Authorizations

Authorization
string
header
required

API Key authentication. Format: Bearer YOUR_API_KEY.

Body

application/json

Generate one PNG from a prompt. Set width and height together to customize the default 1024 × 1024 size. The total pixel count must be at most 4,194,304.

prompt
string
required

Describe the image to generate. The platform limit is 32,000 UTF-8 bytes.

Required string length: 1 - 32000
Example:

"A simple red ceramic mug on a pale blue table, clean studio product photography."

width
integer
default:1024
required if height is set

Output dimension in pixels. Provide height when you set this field.

Required range: 768 <= x <= 5461
Example:

1024

height
integer
default:1024
required if width is set

Output dimension in pixels. Provide width when you set this field.

Required range: 768 <= x <= 5461
Example:

1024

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.