GeminiDocumentation Index
Fetch the complete documentation index at: https://docs.tokenlab.sh/llms.txt
Use this file to discover all available pages before exploring further.
generateContent 接口的流式版本。返回服务器发送事件(Server-Sent Events)。
路径参数
模型名称(例如,
gemini-2.5-pro,gemini-2.5-flash)。查询参数
API 密钥(标头身份验证的替代方案)。
请求正文
与 生成内容 相同。 流式请求请省略generationConfig.candidateCount 或保持为 1;更大的值会被拒绝,而不会静默丢弃额外候选结果。