Skip to main content
POST
Text Generation

Query Parameters

key
string
required

API Key

Body

application/json
contents
object[]
required

Array of conversation contents with user and model messages.

Example:
systemInstruction
object

System instruction

Example:
generationConfig
object
thinkingConfig
object

Thinking configuration for controlling reasoning depth

Response

Response generated successfully

candidates
object[]
usageMetadata
object