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

# Clone Voice

> Clone a new voice for yourself



## OpenAPI

````yaml https://api.topmediai.com/topmediai_api.json post /v1/clone
openapi: 3.1.0
info:
  title: Topmediai API Documentation
  description: >-
    This is the documentation for the Topmediai API. You can use this API to use
    our service programmatically, this is done by using your x-api-key. You can
    get your x-api-key by request our Get API Key Web page on
    https://www.topmediai.com/api/text-to-speech-api/. Our API is experimental
    so all endpoints are subject to change.
  version: 1.0.0
servers:
  - url: https://api.topmediai.com
security: []
paths:
  /v1/clone:
    post:
      tags:
        - Clone-Voice
      summary: Clone Voice
      description: Clone a new voice for yourself
      operationId: clone_voice_v1_clone_post
      parameters:
        - name: model
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/VoiceClonePlanName'
        - name: x-api-key
          in: header
          required: false
          schema:
            type: string
            title: X-Api-Key
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_clone_voice_v1_clone_post'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIVoiceCloneResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: Detail
                    type: string
                required:
                  - detail
                title: ErrorResponse
                type: object
              examples:
                No files uploaded:
                  value:
                    detail: Please upload at least 1 audio file
                Too many files uploaded:
                  value:
                    detail: Please upload at most 20 audio files
                File too large:
                  value:
                    detail: >-
                      File size too large, please upload files with a maximum of
                      10MB
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    VoiceClonePlanName:
      type: string
      enum:
        - Gen
        - HD
      title: VoiceClonePlanName
    Body_clone_voice_v1_clone_post:
      properties:
        name:
          type: string
          maxLength: 50
          minLength: 1
          title: Name
        files:
          anyOf:
            - items:
                type: string
                format: binary
              type: array
            - type: 'null'
          title: Files
        description:
          type: string
          title: Description
      type: object
      required:
        - name
      title: Body_clone_voice_v1_clone_post
    APIVoiceCloneResponse:
      properties:
        speaker:
          type: string
          title: Speaker
          example: d330dcc61cfc4bc090ed3b21197eda41
      type: object
      required:
        - speaker
      title: APIVoiceCloneResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````