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

# Get TTS Voices

> Retrieve a list of available voices for text-to-speech generation.

Returns all predefined voices (ElevenLabs and OpenAI) and optionally the user's custom cloned voices.

**Filtering:**
- Filter by language using the `language` query parameter
- Filter by accent using the `accent` query parameter
- Both filters can be used together

**Authentication:**
- Optional: Endpoint works without authentication for public voices
- Required for custom voices: Include `x-api-key` header



## OpenAPI

````yaml GET /api/get-text-to-speech-voices
openapi: 3.0.1
info:
  title: Easy-Peasy.AI API
  description: >-
    OpenAPI Specifications for the Easy-Peasy.AI API.


    All API requests must be authenticated with an API key. Include the
    `x-api-key` API key in the request header with all requests. You can get the
    API key [here](https://easy-peasy.ai/settings/api).
  version: 1.0.4
servers:
  - url: https://easy-peasy.ai
security:
  - apiKeyAuth: []
paths:
  /api/get-text-to-speech-voices:
    get:
      summary: Get TTS Voices
      description: >-
        Retrieve a list of available voices for text-to-speech generation.


        Returns all predefined voices (ElevenLabs and OpenAI) and optionally the
        user's custom cloned voices.


        **Filtering:**

        - Filter by language using the `language` query parameter

        - Filter by accent using the `accent` query parameter

        - Both filters can be used together


        **Authentication:**

        - Optional: Endpoint works without authentication for public voices

        - Required for custom voices: Include `x-api-key` header
      operationId: getTTSVoices
      parameters:
        - name: x-api-key
          in: header
          required: false
          schema:
            type: string
          description: Your API key (optional, required for custom voices)
          example: 27feb2bb-aeb4-4a83-9fb6-8f3f2a15885e
        - name: language
          in: query
          required: false
          schema:
            type: string
          description: Filter voices by language (e.g., "English", "Spanish", "French")
          example: English
        - name: accent
          in: query
          required: false
          schema:
            type: string
          description: Filter voices by accent (e.g., "American", "British", "Australian")
          example: American
        - name: include_custom
          in: query
          required: false
          schema:
            type: boolean
            default: true
          description: >-
            Include user's custom cloned voices in the response (requires
            authentication)
          example: true
      responses:
        '200':
          description: Successfully retrieved voices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoicesResponse'
              examples:
                all-voices:
                  summary: All voices without filters
                  value:
                    voices:
                      - id: 21m00Tcm4TlvDq8ikWAM
                        name: Rachel
                        description: calm
                        image: https://media.easy-peasy.ai/voices/rachel.png
                        language: English
                        accent: American
                      - id: alloy
                        name: Alloy
                        description: A neutral, balanced voice
                        image: https://media.easy-peasy.ai/voices/alloy.png
                        language: English
                    total: 2
                    filters:
                      language: null
                      accent: null
                    available:
                      languages:
                        - English
                        - Spanish
                        - French
                        - German
                      accents:
                        - American
                        - British
                        - Australian
                filtered-voices:
                  summary: Filtered by language
                  value:
                    voices:
                      - id: 21m00Tcm4TlvDq8ikWAM
                        name: Rachel
                        description: calm
                        image: https://media.easy-peasy.ai/voices/rachel.png
                        language: English
                        accent: American
                    total: 1
                    filters:
                      language: English
                      accent: null
                    available:
                      languages:
                        - English
                      accents:
                        - American
                        - British
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Your account is blocked. Please contact support.
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Method not allowed
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Server error. Please try again.
components:
  schemas:
    VoicesResponse:
      type: object
      required:
        - voices
        - total
        - filters
        - available
      properties:
        voices:
          type: array
          items:
            $ref: '#/components/schemas/Voice'
          description: Array of voice objects
        total:
          type: integer
          description: Total number of voices returned
          example: 50
        filters:
          type: object
          properties:
            language:
              type: string
              nullable: true
              description: Applied language filter
              example: English
            accent:
              type: string
              nullable: true
              description: Applied accent filter
              example: American
          description: Filters that were applied to the results
        available:
          type: object
          properties:
            languages:
              type: array
              items:
                type: string
              description: List of available languages in the filtered results
              example:
                - English
                - Spanish
                - French
            accents:
              type: array
              items:
                type: string
              description: List of available accents in the filtered results
              example:
                - American
                - British
                - Australian
          description: Available filter options based on current results
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
          example: Invalid API key
    Voice:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          description: Unique voice identifier
          example: 21m00Tcm4TlvDq8ikWAM
        name:
          type: string
          description: Voice name
          example: Rachel
        description:
          type: string
          description: Voice description
          example: calm, warm, professional
        image:
          type: string
          format: uri
          description: Full URL to voice avatar image
          example: https://media.easy-peasy.ai/voices/rachel.png
        language:
          type: string
          description: Language supported by the voice
          example: English
        accent:
          type: string
          description: Voice accent
          example: American
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Get yours at
        https://easy-peasy.ai/settings/api

````