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

Minimum string length: 1
Example:

"A colorful abstract painting with flowing shapes"

aspectRatio
enum<string>
default:1:1

Image aspect ratio. Defaults to 1:1.

Available options:
1:1,
3:2,
2:3,
3:4,
1:4,
4:1,
4:3,
4:5,
5:4,
1:8,
8:1,
9:16,
16:9,
21:9,
9:21
Example:

"1:1"

imageSize
enum<string>
default:1K

Output image resolution. Defaults to 1K. 512 is not supported.

Available options:
1K,
2K,
4K
Example:

"1K"

thinkingLevel
enum<string>
default:medium

Thinking effort. minimal is fastest; high spends more thinking. Defaults to medium.

Available options:
minimal,
medium,
high
Example:

"medium"

systemInstruction
string

Optional system instruction. Omitted when empty. Not sent upstream when blank.

When true, enables Google Search grounding with web search and image search. Image search cannot be used to look up people. Omitted or false does not send the tool. Search uses extra tokens.

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.