Skip to main content
POST
cURL

Query Parameters

key
string
required

API Key

alt
string

Set to sse for Server-Sent Events streaming

Body

application/json
contents
object[]
required

Array of conversation contents with user and model messages.

Example:
systemInstruction
object

System instruction

Example:
safetySettings
object[]

Safety filter settings

generationConfig
object

Response

Streaming response generated successfully

candidates
object[]
usageMetadata
object