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

# List Voices

Retrieve a list of all available voices from various voice providers for your voice agents. This endpoint supports multiple voice providers including ElevenLabs, OpenAI, Deepgram, Sarvam, and others.

## API Endpoint

**Endpoint:** `GET /api/voice-list`

**Authentication:** Required (Token header: `token` or `api_access_token`)

## Query Parameters

| Parameter    | Type    | Required | Description                                                                         |
| ------------ | ------- | -------- | ----------------------------------------------------------------------------------- |
| `provider`   | string  | Yes      | Voice provider name. Supported values: `elevenlabs`, `openai`, `deepgram`, `sarvam` |
| `page_token` | string  | No       | Token for pagination to retrieve the next page of results                           |
| `limit`      | integer | No       | Number of voices to return per page (default varies by provider)                    |

```json theme={null}
{
  "error": false,
  "code": 200,
  "message": "Voices fetched successfully for provider: elevenlabs",
  "timestamp": 1769243432947,
  "data": {
    "provider_id": "1",
    "provider_name": "elevenlabs",
    "total_count": 152,
    "next_page_token": "aHBwNEozVnFOZldBVU9PMGQxVXN8QjE4aWZwOUlOVk4zU0UyUm9vcEE=",
    "has_more": true,
    "voices": [
      {
        "id": "s3I1dCXC0u6BYPeTyp1u",
        "title": "Srivi - Calm, Supportive and Clear",
        "category": "professional",
        "description": "Srivi - Professional BFSI Customer Care Voice - Srivi's voice is professional, clear, and reassuring – perfect for BFSI customer support in Tamil.",
        "url": "https://storage.googleapis.com/eleven-public-prod/database/workspace/ed9b05e6324c457685490352e9a1ec90/voices/s3I1dCXC0u6BYPeTyp1u/zqKmGomJkmpmwDWuG2tH.mp3",
        "language": "ta",
        "age": "middle_aged",
        "gender": "female",
        "image": null
      },
      {
        "id": "hpp4J3VqNfWAUOO0d1Us",
        "title": "Bella - Professional, Bright, Warm",
        "category": "premade",
        "description": "This voice is warm, bright, and professional, characterized by a Standard American accent and a polished, narrative quality.",
        "url": "https://storage.googleapis.com/eleven-public-prod/premade/voices/hpp4J3VqNfWAUOO0d1Us/dab0f5ba-3aa4-48a8-9fad-f138fea1126d.mp3",
        "language": "en",
        "age": "middle_aged",
        "gender": "female",
        "image": null
      }
    ]
  }
}
```

### Response Fields

| Field                  | Type    | Description                                              |
| ---------------------- | ------- | -------------------------------------------------------- |
| `error`                | boolean | Indicates if there was an error                          |
| `code`                 | integer | HTTP status code                                         |
| `message`              | string  | Success or error message                                 |
| `timestamp`            | integer | Unix timestamp in milliseconds                           |
| `data`                 | object  | Response data object                                     |
| `data.provider_id`     | string  | Unique identifier for the provider                       |
| `data.provider_name`   | string  | Name of the voice provider                               |
| `data.total_count`     | integer | Total number of available voices                         |
| `data.next_page_token` | string  | Token for fetching the next page (null if no more pages) |
| `data.has_more`        | boolean | Indicates if more voices are available                   |
| `data.voices`          | array   | Array of voice objects                                   |

### Voice Object Fields

| Field         | Type   | Description                                             |
| ------------- | ------ | ------------------------------------------------------- |
| `id`          | string | Unique voice identifier (use this when creating agents) |
| `title`       | string | Display name of the voice                               |
| `category`    | string | Voice category (`professional`, `premade`, etc.)        |
| `description` | string | Detailed description of the voice characteristics       |
| `url`         | string | Sample audio URL to preview the voice                   |
| `language`    | string | Language code (e.g., `en`, `ta`, `ar`, `hi`)            |
| `age`         | string | Age category (`young`, `middle_aged`, `old`)            |
| `gender`      | string | Gender (`male`, `female`, `neutral`)                    |
| `image`       | string | Profile image URL (may be null)                         |

## Error Responses

### 400 - Bad Request

**Status Code:** `400 Bad Request`

```json theme={null}
{
  "error": true,
  "code": 400,
  "message": "Provider parameter is required",
  "data": {}
}
```

### 401 - Authentication Error

**Status Code:** `401 Unauthorized`

```json theme={null}
{
  "error": true,
  "code": 401,
  "message": "Invalid Auth Key or Session Expired",
  "data": {}
}
```

### 404 - Provider Not Found

**Status Code:** `404 Not Found`

```json theme={null}
{
  "error": true,
  "code": 404,
  "message": "Provider not found",
  "data": {}
}
```

### 500 - Server Error

**Status Code:** `500 Internal Server Error`

```json theme={null}
{
  "error": true,
  "code": 500,
  "message": "Internal server error",
  "data": {}
}
```

## Pagination

When `has_more` is `true`, use the `next_page_token` value in your next request to fetch the next page of voices:

```bash theme={null}
curl -X GET "https://www.tryunleashx.com/api/voice-list?provider=elevenlabs&page_token=YOUR_NEXT_PAGE_TOKEN" \
  -H "token: YOUR_AUTH_TOKEN"
```

## Supported Providers

| Provider   | ID           | Description                                        |
| ---------- | ------------ | -------------------------------------------------- |
| ElevenLabs | `elevenlabs` | High-quality AI voices with emotional range        |
| OpenAI     | `openai`     | OpenAI's text-to-speech voices                     |
| Deepgram   | `deepgram`   | Fast, accurate voice synthesis                     |
| Sarvam     | `sarvam`     | Multilingual voices optimized for Indian languages |

## Usage Notes

* Use the `id` field from the voice object when creating or updating agents with the `voice_id` parameter
* Preview voices using the `url` field before selecting one for your agent
* Filter voices by `language`, `gender`, or `age` in your application logic
* The `category` field helps identify voice types (`professional` for business use, `premade` for general purpose)
* Some providers may have rate limits on voice listing; implement caching when possible

## Example: Using Voice ID in Agent Creation

After fetching voices, use the voice `id` when creating an agent:

```bash theme={null}
curl -X POST "https://www.tryunleashx.com/api/agent/createagentorupdate" \
  -H "token: YOUR_AUTH_TOKEN" \
  -F "basic_details[agent_name]=My Agent" \
  -F "basic_details[voice_id]=s3I1dCXC0u6BYPeTyp1u" \
  -F "basic_details[voice_provider]=1"
```


## OpenAPI

````yaml api-reference/openapi.json GET /voice-list
openapi: 3.1.0
info:
  title: >-
    UnleashX - Build human like conversations | Voice Agents | Automations | AI
    Workforce
  version: 1.0.0
  description: UnleashX - Your home for human like conversations
servers:
  - url: https://www.tryunleashx.com/api/v1/global/
security:
  - bearerAuth: []
paths:
  /voice-list:
    get:
      tags:
        - Voice AI
      summary: List voices
      parameters:
        - name: token
          in: header
          required: true
          description: API token for authentication
          schema:
            type: string
        - name: provider_id
          in: query
          required: true
          schema:
            type: string
            enum:
              - elevenlabs
              - openai
              - deepgram
              - sarvam
          description: Voice provider identifier
        - name: page_token
          in: query
          required: false
          schema:
            type: string
          description: Token for pagination to retrieve the next page of results
        - name: limit
          in: query
          required: false
          schema:
            type: integer
          description: Number of voices to return per page
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                  code:
                    type: integer
                  message:
                    type: string
                  timestamp:
                    type: integer
                  data:
                    type: object
                    properties:
                      provider_id:
                        type: string
                      provider_name:
                        type: string
                      total_count:
                        type: integer
                      next_page_token:
                        type: string
                      has_more:
                        type: boolean
                      voices:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            title:
                              type: string
                            category:
                              type: string
                            description:
                              type: string
                            url:
                              type: string
                            language:
                              type: string
                            age:
                              type: string
                            gender:
                              type: string
                            image:
                              type: string
                              nullable: true
        '400':
          description: Bad Request - Provider ID is required
        '401':
          description: Unauthorized
        '404':
          description: Provider not found
        '500':
          description: Internal Server Error
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````