Skip to main content
POST

Authorizations

Authorization
string
header
required

All endpoints require Bearer Token authentication

Add the following to your request headers:

Authorization: Bearer YOUR_API_KEY

Path Parameters

model
enum<string>
required

Model name. Supports gemini-3-pro-image-preview (professional asset creation, advanced reasoning) and gemini-3.1-flash-image-preview (high efficiency, optimized for speed)

Available options:
gemini-3-pro-image-preview,
gemini-3.1-flash-image-preview
Example:

"gemini-3.1-flash-image-preview"

Body

application/json
contents
object[]
required

List of conversation contents

generationConfig
object
required

Generation config (responseModalities must be set for image generation)

systemInstruction
object

System instruction

safetySettings
object[]

Safety settings

Response

Image generation response

candidates
object[]

List of candidate results

usageMetadata
object

Usage statistics