Skip to main content
POST

Authorizations

Authorization
string
header
required

API Key authentication. Format: Bearer YOUR_API_KEY.

Body

application/json

Imagen 4.0 Fast request schema. Supports prompt, sampleCount, aspectRatio, and personGeneration.

prompt
string
required

Image description text

Minimum string length: 1
Example:

"Watercolor illustration of a Japanese pagoda surrounded by cherry blossoms"

sampleCount
integer
default:1

Number of images to generate per request

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

1

aspectRatio
enum<string>
default:1:1

Image aspect ratio

Available options:
1:1,
3:4,
4:3,
9:16,
16:9
Example:

"1:1"

personGeneration
enum<string>
default:allow_all

Person generation policy

Available options:
dont_allow,
allow_adult,
allow_all
Example:

"allow_all"

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.