Skip to main content
Streaming version of the Gemini generateContent endpoint. Returns Server-Sent Events.

Path Parameters

string
required
Model name (e.g., gemini-2.5-pro, gemini-3.5-flash).

Query Parameters

string
API key (alternative to header authentication).

Request Body

Same as Generate Content. This includes multimodal parts arrays with structured inline_data image parts for vision requests. AI Sonar preserves camelCase, original proto snake_case, mixed spellings, unknown fields, explicit null, and empty arrays. It does not pre-reject candidateCount or tool combinations; the selected Gemini service determines support.

Response

Returns native Gemini Server-Sent Events. Metadata-only events, intermediate chunks without finishReason, and natural EOF are valid. AI Sonar does not append Chat Completions’ [DONE] sentinel.