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

# Preload Cloned TTS Voice

> This endpoint allows you to preload a custom cloned voice into the system's before using it. You only need to preload the voice only once. You may preload it once your application starts to reduce any latency if you use the Real-Time APIs.



## OpenAPI

````yaml /api-reference/openapi.json post /v2/tts/voices/custom/preload
openapi: 3.0.1
info:
  title: Hamsa API
  description: Trying out our transcription and media-to-text APIs
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tryhamsa.com
security: []
paths:
  /v2/tts/voices/custom/preload:
    post:
      summary: Preload a cloned TTS voice into the system
      description: >-
        This endpoint allows you to preload a custom cloned voice into the
        system's before using it. You only need to preload the voice only once.
        You may preload it once your application starts to reduce any latency if
        you use the Real-Time APIs.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreloadVoiceRequest'
      responses:
        '200':
          description: Voice successfully preloaded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreloadVoiceResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '404':
          description: Voice not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '500':
          description: Server Side Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    PreloadVoiceRequest:
      type: object
      required:
        - voiceId
      properties:
        voiceId:
          type: string
          description: >-
            The unique identifier of the custom cloned voice to preload into the
            system
          example: c803658e-ccec-47e7-ad0f-1caf9ba4babb
    PreloadVoiceResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Custom voice have been preloaded successfully
        data:
          type: array
          items: {}
          example: []
    ErrorSchema:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass the API key in the Authorization header, You need to put Token
        keyword before the API key. e.g. 'Authorization: Token <api-key>'

````