Gemini Stream Generate Content
Run in Apifox
Google Gemini native streaming generation API. Use alt=sse query parameter for SSE format. Authentication: use x-goog-api-key header or ?key= query parameter.
Request Add parameter in header Authorization
Example: Authorization: ********************
or
Body Params application/json Required
{
"contents" : [
{ }
] ,
"generationConfig" : { } ,
"tools" : [
{ }
]
} Request Code Samples
curl --location --request POST 'https://api.ccapi.ai//v1beta/models/:streamGenerateContent?key&alt' \
--header 'x-goog-api-key;' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [
{}
],
"generationConfig": {},
"tools": [
{}
]
}' Responses text/event-stream
Gemini SSE streaming response
Modified at 2026-03-15 06:56:57