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

# List voices

> Returns the voices that can speak a language.

Get `languageId` from [List languages](https://docs.olimi.ai/api-reference/endpoint/speech/list-tts-languages.md) first.

A language that isn't available for speech returns an empty list rather than an error.

> [!WARNING]
>
> Being listed is not a guarantee that a voice works. Test the voices you plan to use, and keep a fallback voice.


## OpenAPI

````yaml get /api/v2/tts/voices
openapi: 3.0.1
info:
  title: Customer Management API
  description: API for managing customer lists and customers within those lists
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api-eg.olimi.ai
security:
  - bearerAuth: []
paths:
  /api/v2/tts/voices:
    get:
      tags:
        - Text to Speech
      summary: List voices
      description: Returns the voices that can speak a language.
      parameters:
        - name: languageId
          in: query
          required: true
          description: >-
            The language's `id`, from [List
            languages](/api-reference/endpoint/speech/list-tts-languages).
          schema:
            type: string
            format: uuid
          example: 2cdab2de-310d-59a3-ad68-b85b4526e37b
      responses:
        '200':
          description: >-
            The voices for that language. Empty when the language isn't
            available for speech.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TtsVoicesResponse'
        '400':
          description: '`languageId` is missing or isn''t a valid UUID.'
        '401':
          description: The `X-API-KEY` header is missing or the key isn't valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - apiKeyAuth: []
components:
  schemas:
    TtsVoicesResponse:
      type: object
      properties:
        message:
          type: string
          example: Voices fetched successfully
        data:
          type: array
          items:
            $ref: '#/components/schemas/TtsVoice'
    ApiError:
      type: object
      properties:
        statusCode:
          type: integer
          example: 404
        errorCode:
          type: string
          description: Machine-readable error code.
          example: agent_not_found
        message:
          type: string
          description: Human-readable text. May change; don't match on it.
          example: Agent not found
    TtsVoice:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Send this as `voiceId`.
          example: 118d2470-de1d-5093-86b3-f2d8adec3183
        name:
          type: string
          description: The voice's display name.
          example: Farida
        voiceKey:
          type: string
          description: >-
            The voice's short key. Also accepted by the `voice` filter of List
            audio.
          example: Kore
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````

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