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

# Get TTS Config

> Retrieve available Text-to-Speech providers and voices for agent voice output settings

## Overview

Retrieve available TTS (Text-to-Speech) providers, models, and voices filtered by language. The TTS engine is the agent's "voice" — it converts the LLM's text responses into spoken audio that the caller hears. Each voice entry includes metadata such as gender and a sample audio URL so you can preview voices before selecting one.

The `language` parameter is **required**. For multilingual agents, pass all language codes together to return only voices that support every language in the set.

## Required Permission

`agents`

## Query Parameters

| Name         | Type   | Required | Description                                                                                                                                                                               |
| ------------ | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `language`   | string | **Yes**  | Filter by one or more language codes. Repeat this parameter for multiple languages (e.g. `?language=en-IN&language=hi-IN`). Returns only voices that support **all** specified languages. |
| `providerId` | string | No       | Filter results to a specific TTS provider (e.g. `gnani`).                                                                                                                                 |

## Example cURL

### Single Language

```bash theme={null}
curl "https://api.inya.ai/platform/v1/agents/config/tts_config?language=en-IN" \
  -H "x-api-key: <your_api_key>"
```

### Multiple Languages

```bash theme={null}
curl "https://api.inya.ai/platform/v1/agents/config/tts_config?language=en-IN&language=hi-IN" \
  -H "x-api-key: <your_api_key>"
```

### Filter by Provider

```bash theme={null}
curl "https://api.inya.ai/platform/v1/agents/config/tts_config?language=en-IN&providerId=gnani" \
  -H "x-api-key: <your_api_key>"
```

## Response

### Success (200)

```json theme={null}
{
  "status": "success",
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "message": "TTS config retrieved successfully",
  "response": {
    "ttsConfig": [
      {
        "name": "Gnani",
        "provider": {
          "providerId": "vachana_timbre-v2.5",
          "label": "Gnani"
        },
        "models": [
          {
            "modelId": "vachana-voice-v1-standard-streaming",
            "label": "Gnani Vachana",
            "supportedLanguages": ["en-IN", "hi-IN", "kn-IN", "ta-IN", "te-IN"],
            "voices": [
              {
                "voiceId": "Pranav",
                "name": "Pranav",
                "label": "Pranav",
                "supportedLanguages": ["en-IN", "hi-IN"],
                "isMultilingual": true,
                "gender": "male",
                "demoAudioUrl": "",
                "accent": [],
                "tone": []
              },
              {
                "voiceId": "Shubhra",
                "name": "Shubhra",
                "label": "Shubhra",
                "supportedLanguages": ["en-IN", "hi-IN"],
                "isMultilingual": true,
                "gender": "female",
                "demoAudioUrl": "",
                "accent": [],
                "tone": []
              }
            ]
          }
        ]
      }
    ]
  }
}
```

### Error Responses

**404 Not Found** - Missing language parameter or no matching configuration

```json theme={null}
{
  "status": "failure",
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "message": "Language parameter is empty",
  "response": { "ttsConfig": [] }
}
```

## Response Fields

| Field                                              | Type      | Description                                                                                 |
| -------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------- |
| `ttsConfig[].name`                                 | string    | Human-readable provider display name.                                                       |
| `ttsConfig[].provider.providerId`                  | string    | TTS provider identifier. Use as the `provider` value in `ttsParams` when updating an agent. |
| `ttsConfig[].provider.label`                       | string    | Human-readable provider label.                                                              |
| `ttsConfig[].models[].modelId`                     | string    | Model identifier.                                                                           |
| `ttsConfig[].models[].label`                       | string    | Human-readable model display name.                                                          |
| `ttsConfig[].models[].supportedLanguages`          | string\[] | BCP-47 language codes supported by this model.                                              |
| `ttsConfig[].models[].voices[].voiceId`            | string    | Voice identifier. Use as the `voice` value in `ttsParams`.                                  |
| `ttsConfig[].models[].voices[].name`               | string    | Human-readable voice display name.                                                          |
| `ttsConfig[].models[].voices[].supportedLanguages` | string\[] | BCP-47 language codes this specific voice supports.                                         |
| `ttsConfig[].models[].voices[].isMultilingual`     | boolean   | Whether this voice can speak across multiple languages.                                     |
| `ttsConfig[].models[].voices[].gender`             | string    | Voice gender: `male` or `female`.                                                           |
| `ttsConfig[].models[].voices[].demoAudioUrl`       | string    | URL to a preview audio clip. Use this to let users listen to the voice before selecting it. |
| `ttsConfig[].models[].voices[].accent`             | string\[] | Accent tags associated with this voice.                                                     |
| `ttsConfig[].models[].voices[].tone`               | string\[] | Tone tags associated with this voice.                                                       |

## Use Cases

* Populating a voice selector with audio preview in agent configuration
* Filtering TTS voices to only those compatible with the agent's configured languages
* Comparing voice options across providers to best match your brand's tone
* Building a voice gallery or preview feature using `sample_audio_url`

<Note>
  The `language` parameter is **required**. A request without at least one language value will return a 404 error. Use language codes from **Get Languages**.
</Note>

<Tip>
  For multilingual agents, pass all configured language codes together (e.g. `?language=en-IN&language=hi-IN`) to find voices that support every language. This prevents selecting a voice that only works in one of the configured languages.
</Tip>

<Info>
  The `provider.providerId` and `voiceId` values map directly to the `provider` and `voice` fields in the **Update Agent** `ttsParams` object. Use the `demoAudioUrl` to build an audio preview feature so users can hear voices before committing to a selection.
</Info>

<Note>
  Save the `requestId` from every response. You will need it if you contact Inya support to trace a specific request.
</Note>


## OpenAPI

````yaml GET /v1/agents/config/tts_config
openapi: 3.0.3
info:
  title: Platform Agent Config API
  description: >-
    Read-only endpoints for discovering valid configuration values — languages,
    regions, timezones, LLM models, ASR providers, and TTS voices — before
    creating or updating agents.
  version: 2.1.0
servers:
  - url: https://api.inya.ai/platform
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: AgentConfiguration
    description: Agent configuration discovery operations
paths:
  /v1/agents/config/tts_config:
    get:
      tags:
        - AgentConfiguration
      summary: Get TTS configuration
      description: >-
        Retrieve TTS providers, models, and voice options that support the
        specified language or combination of languages.
      operationId: getTtsConfig
      parameters:
        - name: language
          in: query
          description: >-
            Language codes to filter by. At least one required. Repeat this
            parameter for multiple languages.
          required: true
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
          example: en-IN
        - name: providerId
          in: query
          description: Filter results to a specific TTS provider
          required: false
          schema:
            type: string
            example: gnani
      responses:
        '200':
          description: TTS config retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardResponse'
              examples:
                success:
                  value:
                    status: success
                    requestId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                    message: TTS config retrieved successfully
                    response:
                      ttsConfig:
                        - name: Gnani
                          provider:
                            providerId: vachana_timbre-v2.5
                            label: Gnani
                          models:
                            - modelId: vachana-voice-v1-standard-streaming
                              label: Gnani Vachana
                              supportedLanguages:
                                - en-IN
                                - hi-IN
                                - kn-IN
                                - ta-IN
                                - te-IN
                              voices:
                                - voiceId: Pranav
                                  name: Pranav
                                  supportedLanguages:
                                    - en-IN
                                    - hi-IN
                                  isMultilingual: true
                                  gender: male
                                  demoAudioUrl: ''
        '404':
          description: Language parameter is empty or TTS config not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    StandardResponse:
      type: object
      properties:
        status:
          type: string
          example: success
        requestId:
          type: string
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        message:
          type: string
        response:
          type: object
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: failure
        requestId:
          type: string
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        message:
          type: string
  responses:
    ServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key with 'agents' permission

````