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

# Start voice training

> Start training/cloning a voice after uploading training files. Consumes 10 API credits per maxMinute. Check requiredCredits after creating the voice.



## OpenAPI

````yaml post /v1/me/voices/{voiceId}/clone
openapi: 3.1.0
info:
  title: VoiceDub API
  description: API for creating AI voice dubs and training custom voice models
  version: 1.0.0
  contact:
    name: VoiceDub Support
    email: help@voicedub.ai
    url: https://voicedub.ai
servers:
  - url: https://api.voicedub.ai
    description: Production server
security:
  - apiKeyAuth: []
tags:
  - name: Dubs
    description: Operations for creating and managing voice dubs
  - name: Voices
    description: Operations for creating and managing voice models
  - name: User
    description: Operations for managing user account and settings
paths:
  /v1/me/voices/{voiceId}/clone:
    post:
      tags:
        - Voices
      summary: Start voice training
      description: >-
        Start training/cloning a voice after uploading training files. Consumes
        10 API credits per maxMinute. Check requiredCredits after creating the
        voice.
      operationId: cloneVoice
      parameters:
        - in: path
          name: voiceId
          description: UUID of the voice to start training
          schema:
            type: string
            format: uuid
            description: UUID of the voice to start training
            example: 123e4567-e89b-12d3-a456-426614174000
          required: true
      responses:
        '200':
          description: Voice training started successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloneVoiceResponse'
        '400':
          description: Bad request - voice is not in new status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceNotNewError'
        '404':
          description: Voice not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceNotFoundError'
components:
  schemas:
    CloneVoiceResponse:
      type: object
      properties:
        voice:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: Unique identifier for the voice
              example: 123e4567-e89b-12d3-a456-426614174000
            name:
              type: string
              description: Display name of the voice
              example: My Custom Voice
            status:
              type: string
              enum:
                - new
                - queued
                - starting
                - processing
                - finalizing
                - done
                - error
              description: Current training/processing status of the voice
              example: queued
              openapi:
                description: Current training/processing status of the voice
                example: done
            separate:
              type: boolean
              description: Whether vocals separation was used during training
              example: true
            maxMinutes:
              type: integer
              description: Maximum duration of training audio in minutes
              example: 10
            errorCode:
              type:
                - string
                - 'null'
              description: Error code if training failed (null for now)
              example: null
            errorMessage:
              type:
                - string
                - 'null'
              description: Error message if training failed (null for now)
              example: null
            apiCreditsUsed:
              type: integer
              description: >-
                API credits consumed for training this voice (0 before /clone is
                called)
              example: 100
              openapi:
                description: >-
                  API credits consumed for training this voice (0 before /clone
                  is called)
                example: 100
            apiCreditsLeft:
              type:
                - integer
                - 'null'
              description: >-
                Remaining API credits after training (null before /clone is
                called)
              example: 450
              openapi:
                description: >-
                  Remaining API credits after training (null before /clone is
                  called)
                example: 450
            completedAt:
              type:
                - string
                - 'null'
              description: >-
                Timestamp when voice training completed (null if status is not
                "done" or "error")
              example: null
              openapi:
                description: >-
                  Timestamp when voice training completed (null if status is not
                  "done" or "error")
                example: '2024-01-15T10:30:00.000Z'
            createdAt:
              type: string
              description: Timestamp when voice was created
              example: '2024-01-15T10:00:00.000Z'
            updatedAt:
              type: string
              description: Timestamp when voice was last updated
              example: '2024-01-15T10:30:00.000Z'
            requiredCredits:
              type: number
              description: Number of credits required to process this voice
              example: 100
          required:
            - id
            - name
            - status
            - separate
            - maxMinutes
            - errorCode
            - errorMessage
            - apiCreditsUsed
            - apiCreditsLeft
            - completedAt
            - createdAt
            - updatedAt
            - requiredCredits
      required:
        - voice
    VoiceNotNewError:
      type: object
      properties:
        code:
          type: string
          const: voice_is_not_new
          description: Error code
          example: voice_is_not_new
        message:
          type: string
          description: Human-readable error message
          example: Voice is not new
      required:
        - code
        - message
    VoiceNotFoundError:
      type: object
      properties:
        code:
          type: string
          const: not_found
          description: Error code
          example: not_found
        message:
          type: string
          description: Human-readable error message
          example: Voice not found
      required:
        - code
        - message
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'API key in the format: "Api-Key <your-api-key>"'

````