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

# Stream generate content

> Stream Gemini generateContent output as server-sent events.

Same request body as [Generate content](/api-reference/gemini/generate-content). The response is an SSE stream instead of a single JSON object.

<ParamField path="model" type="string" required>
  Gemini model ID, for example `gemini-3-flash-preview`.
</ParamField>

```bash theme={"dark"}
curl "https://api.pipellm.ai/v1beta/models/gemini-3-flash-preview:streamGenerateContent" \
  -H "Content-Type: application/json" \
  -H "x-goog-api-key: $PIPELLM_API_KEY" \
  -N \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [{"text": "Count to five."}]
      }
    ]
  }'
```

Use `x-goog-api-key: $PIPELLM_API_KEY`. Native Gemini routes only go to Gemini platforms. To keep Gemini format while calling OpenAI or Anthropic models, use the [Gemini converter](/converter/gemini-format).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.