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

# Gemini 2.5 Pro (Stream)

> Call Google Gemini 2.5 Pro streaming via Gemini API. Supports real-time SSE token streaming.

Gemini 2.5 Pro (Stream) provides streaming text generation based on the Google Gemini 2.5 Pro model, accessible through Starrise AI. Responses are delivered in real time via Server-Sent Events (SSE).

## Key Capabilities

* **SSE streaming** — Real-time token-by-token response delivery
* **Thinking mode** — Supports thinking configuration for enhanced reasoning
* **Multi-turn conversation** — Complex conversations with system instructions
* **Safety filtering** — Configurable content safety filters

## Quick Example

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://ai.alad.com/v1beta/models/gemini-2.5-pro:streamGenerateContent?key=YOUR_API_KEY&alt=sse" \
    -H "Content-Type: application/json" \
    -d '{
      "contents": [
        {
          "role": "user",
          "parts": [{ "text": "Write a short poem about the ocean." }]
        }
      ],
      "generationConfig": {
        "temperature": 1,
        "topP": 1,
        "thinkingConfig": {
          "includeThoughts": true,
          "thinkingBudget": 26240
        }
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  url = "https://ai.alad.com/v1beta/models/gemini-2.5-pro:streamGenerateContent"
  params = {"key": "YOUR_API_KEY", "alt": "sse"}
  data = {
      "contents": [
          {
              "role": "user",
              "parts": [{"text": "Write a short poem about the ocean."}]
          }
      ],
      "generationConfig": {
          "temperature": 1,
          "topP": 1,
          "thinkingConfig": {
              "includeThoughts": True,
              "thinkingBudget": 26240
          }
      }
  }

  response = requests.post(url, params=params, json=data, stream=True)
  for line in response.iter_lines():
      if line:
          print(line.decode())
  ```
</CodeGroup>

## Parameters

| Parameter                         | Type   | Required | Description                               |
| --------------------------------- | ------ | -------- | ----------------------------------------- |
| `key`                             | string | Yes      | API key (query parameter)                 |
| `alt`                             | string | No       | Set to `sse` to enable SSE streaming      |
| `contents`                        | array  | Yes      | Array of `{ role, parts }` objects        |
| `systemInstruction`               | object | No       | System instruction with `parts` array     |
| `generationConfig.temperature`    | float  | No       | `0`–`2`, controls randomness, default `1` |
| `generationConfig.topP`           | float  | No       | Nucleus sampling threshold, default `1`   |
| `generationConfig.thinkingConfig` | object | No       | Thinking mode configuration               |
| `safetySettings`                  | array  | No       | Content safety filter settings            |

<Card title="API Reference" icon="code" href="/en/api-reference/model-api/google/gemini-2-5-pro-stream">
  View the interactive API Playground for Gemini 2.5 Pro (Stream).
</Card>
