Skip to main content
POST
gemini-3.1-flash-image-preview

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
prompt
string
required

Length must be between 1 and 200000.

Required string length: 1 - 200000
model
enum<string>

Must be one of: gemini-3.1-flash-image-preview.

Available options:
gemini-3.1-flash-image-preview
images
string<url>[]

Up to 10 reference images.

Required array length: 1 - 10 elements
size
enum<string>

Must be one of: 16:9, 16x9, 1:1, 1x1, 21:9, 21x9, 2:3, 2x3, 3:2, 3:4, 3x2, 3x4, 4:3, 4:5, 4x3, 4x5, 5:4, 5x4, 9:16, 9x16.

Available options:
16:9,
16x9,
1:1,
1x1,
21:9,
21x9,
2:3,
2x3,
3:2,
3:4,
3x2,
3x4,
4:3,
4:5,
4x3,
4x5,
5:4,
5x4,
9:16,
9x16
quality
enum<string>
default:1K

Must be one of: 0.5K, 1K, 2K, 4K. Defaults to 1K.

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

Response

Task accepted and queued for generation.

code
integer
Example:

0

data
object
msg
string
Example:

"success"

request_id
string<uuid>
Example:

"250b66dd-e1fb-4bb6-b5f6-c668efadc35d"