Skip to main content
POST
Call Gemini generateContent

Authorizations

Authorization
string
header
required

API key (sk-xxx)

Path Parameters

model
string
required

Model name

Body

application/json
contents
object[]
required
generationConfig
object

Optional generation configuration. Image-related fields apply only when the selected Gemini image model supports them.

Response

200 - application/json

Success

candidates
object[]
usageMetadata
object