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

# Gemini 2.5 Flash Preview TTS

> Gemini 2.5 Flash Preview TTS: text-to-speech model. Request examples and parameters for MixRoute.

Gemini 2.5 Flash Preview TTS is a text-to-speech model from Google.

Call `gemini-2.5-flash-preview-tts` through MixRoute's native Gemini endpoint.

## Key capabilities

* Text-to-speech - Convert text into generated audio
* Voice selection - Configure a prebuilt voice
* Audio output - Returns generated speech data

## Quick example

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.mixroute.ai/v1/models/gemini-2.5-flash-preview-tts:generateContent" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "contents": [
        {
          "parts": [
            {
              "text": "Say clearly: Welcome to MixRoute."
            }
          ]
        }
      ],
      "generationConfig": {
        "responseModalities": [
          "AUDIO"
        ],
        "speechConfig": {
          "voiceConfig": {
            "prebuiltVoiceConfig": {
              "voiceName": "Kore"
            }
          }
        }
      }
    }'
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import requests

    response = requests.post(
        "https://api.mixroute.ai/v1/models/gemini-2.5-flash-preview-tts:generateContent",
        headers={"Authorization": "Bearer YOUR_API_KEY"},
        json={'contents': [{'parts': [{'text': 'Say clearly: Welcome to MixRoute.'}]}],
              'generationConfig': {'responseModalities': ['AUDIO'],
                                   'speechConfig': {'voiceConfig': {'prebuiltVoiceConfig': {'voiceName': 'Kore'}}}}},
    )

    print(response.json())
    ```
  </Tab>
</Tabs>

## Parameters

| Parameter                             | Type   | Required | Description            |
| ------------------------------------- | ------ | -------- | ---------------------- |
| `contents`                            | array  | Yes      | Text content to speak. |
| `generationConfig.responseModalities` | array  | Yes      | Set to AUDIO.          |
| `generationConfig.speechConfig`       | object | Yes      | Voice configuration.   |
