> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arouter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Stream Generate Content

> Gemini-compatible streaming generateContent endpoint.

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.arouter.ai/v1beta/models/gemini-2.5-flash:streamGenerateContent?key=lr_live_xxxx&alt=sse" \
    -H "Content-Type: application/json" \
    -d '{
      "contents": [{"parts": [{"text": "Tell me a story."}]}]
    }'
  ```

  ```python Python theme={null}
  model = genai.GenerativeModel("gemini-2.5-flash")
  response = model.generate_content("Tell me a story.", stream=True)
  for chunk in response:
      print(chunk.text, end="")
  ```
</RequestExample>
