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

# Train a PVC voice

> Starts training on a draft voice's uploaded samples.

Returns the voice resource itself, **not** a long-running Operation — poll [Get a PVC voice](/api-reference/pvcAPI/pvcvoiceservice/get-pvc-voice) to track progress through `PVC_VOICE_STATE_QUEUED` → `PVC_VOICE_STATE_TRAINING` → `PVC_VOICE_STATE_READY` (or `PVC_VOICE_STATE_FAILED`).

Calling Train again while already queued or training is a no-op and returns the voice unchanged.

<Warning>
  **This endpoint does not return an Operation.** It responds as soon as the voice is queued, with the voice resource itself (`state: "PVC_VOICE_STATE_QUEUED"`). Poll [Get a PVC voice](/api-reference/pvcAPI/pvcvoiceservice/get-pvc-voice) to track progress — there's no separate operation ID to look up.
</Warning>

Requires at least **600 seconds (10 minutes)** of cumulative sample audio, measured after any [trims](/api-reference/pvcAPI/pvcvoiceservice/trim-pvc-voice-sample) are applied. Calling Train again while the voice is already `PVC_VOICE_STATE_QUEUED` or `PVC_VOICE_STATE_TRAINING` is a no-op — it returns the current voice unchanged rather than starting a second run.

Training starts are rate-limited per plan; exceeding your plan's rate returns `429`.

## How long training takes

Wall time scales with how much audio you uploaded, not how many samples it's split across. As a rough guide, training an hour of audio takes on the order of 10-30 minutes; expect it to take longer under heavy platform demand.

<Note>
  Underlying model training is capped at roughly 2800 seconds of audio and 1000 MB of source data per run — audio beyond that is silently truncated rather than rejected. Keep total sample audio comfortably under this if you're uploading long-form recordings.
</Note>


## OpenAPI

````yaml post /voices/v1/pvcVoices/{voiceId}:train
openapi: 3.0.0
info:
  title: Inworld Professional Voice Cloning API
  version: v1
  contact:
    name: Inworld AI
    url: https://inworld.ai
    email: support@inworld.ai
servers:
  - url: https://api.inworld.ai
security:
  - inworld_basic: []
tags:
  - name: PvcVoiceService
paths:
  /voices/v1/pvcVoices/{voiceId}:train:
    post:
      tags:
        - PvcVoiceService
      summary: Train a PVC voice
      description: >-
        Starts training on a draft voice's uploaded samples.


        Returns the voice resource itself, **not** a long-running Operation —
        poll [Get a PVC
        voice](/api-reference/pvcAPI/pvcvoiceservice/get-pvc-voice) to track
        progress through `PVC_VOICE_STATE_QUEUED` → `PVC_VOICE_STATE_TRAINING` →
        `PVC_VOICE_STATE_READY` (or `PVC_VOICE_STATE_FAILED`).


        Calling Train again while already queued or training is a no-op and
        returns the voice unchanged.
      operationId: PvcVoiceService_TrainPvcVoice
      parameters:
        - name: voiceId
          description: Voice ID of the draft PVC voice to train.
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties: {}
            example: {}
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inworldvoicev1PvcVoice'
              examples:
                queued:
                  summary: Voice queued for training
                  value:
                    name: >-
                      workspaces/your_workspace_id/pvcVoices/my-professional-voice
                    voiceId: my-professional-voice
                    displayName: my-professional-voice
                    languageCode: en-US
                    state: PVC_VOICE_STATE_QUEUED
                    incarnationId: a1b2c3d4
                    createTime: '2026-08-31T12:00:00Z'
                    updateTime: '2026-08-31T12:10:00Z'
        '400':
          description: >-
            Cumulative sample audio (after trimming) is below the 600-second
            minimum.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
              examples:
                insufficient_audio:
                  summary: Not enough audio to train
                  value:
                    code: 3
                    message: >-
                      invalid request: at least 600 seconds of sample audio is
                      required to train, got 214
                    details: []
        '429':
          description: >-
            Your plan's training rate limit was reached, too many training runs
            are already queued or in progress for the workspace, or the
            per-workspace weekly training-start limit was reached.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl --location --request POST
            'https://api.inworld.ai/voices/v1/pvcVoices/<voice-id>:train' \

            --header "Authorization: Basic $INWORLD_API_KEY" \

            --header 'Content-Type: application/json' \

            --data '{}'
        - lang: python
          label: Python
          source: |-
            import requests

            voice_id = "<voice-id>"
            url = f"https://api.inworld.ai/voices/v1/pvcVoices/{voice_id}:train"
            headers = {
                "Authorization": "Basic <api-key>",
                "Content-Type": "application/json"
            }

            response = requests.post(url, headers=headers, json={})
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const voiceId = '<voice-id>';

            const url =
            `https://api.inworld.ai/voices/v1/pvcVoices/${voiceId}:train`;


            const response = await fetch(url, {
              method: 'POST',
              headers: {
                'Authorization': 'Basic <api-key>',
                'Content-Type': 'application/json',
              },
              body: JSON.stringify({}),
            });


            const data = await response.json();

            console.log(data);
components:
  schemas:
    inworldvoicev1PvcVoice:
      type: object
      properties:
        name:
          type: string
          description: 'Resource name. Format: `workspaces/{workspace}/pvcVoices/{voice}`.'
          readOnly: true
        voiceId:
          type: string
          description: >-
            Voice ID, derived from `displayName` at creation time. Use this
            value as `{voiceId}` on every other PVC endpoint, and as the
            `voiceId` in TTS synthesis requests once the voice is
            `PVC_VOICE_STATE_READY`.
          readOnly: true
        displayName:
          type: string
          description: >-
            The human-readable name shown anywhere the voice is listed or
            selected.
        languageCode:
          type: string
          description: >-
            The voice's language as a BCP-47-shaped locale string, e.g. `en-US`.
            Immutable after creation.
        state:
          $ref: '#/components/schemas/inworldvoicev1PvcVoiceState'
        failure:
          $ref: '#/components/schemas/inworldvoicev1PvcVoiceFailure'
        incarnationId:
          type: string
          description: >-
            Identifier that stays stable across edits to the same voice, and
            changes each time it is retrained. Use it to tell two reads of the
            same `voiceId` apart across a retrain.
          readOnly: true
        samples:
          type: array
          items:
            $ref: '#/components/schemas/inworldvoicev1PvcVoiceSample'
          description: Audio samples currently attached to the voice.
          readOnly: true
        createTime:
          type: string
          format: date-time
          readOnly: true
        updateTime:
          type: string
          format: date-time
          readOnly: true
      description: A Professional Voice Clone resource.
    rpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
          description: >-
            The status code, which should be an enum value of
            [google.rpc.Code][google.rpc.Code].
        message:
          type: string
          description: >-
            A developer-facing error message, which should be in English. Any
            user-facing error message should be localized and sent in the
            [google.rpc.Status.details][google.rpc.Status.details] field, or
            localized by the client.
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
          description: >-
            A list of messages that carry the error details. There is a common
            set of message types for APIs to use.
      description: >-
        The `Status` type defines a logical error model that is suitable for
        different programming environments, including REST APIs and RPC APIs.
    inworldvoicev1PvcVoiceState:
      type: string
      enum:
        - PVC_VOICE_STATE_UNSPECIFIED
        - PVC_VOICE_STATE_DRAFT
        - PVC_VOICE_STATE_QUEUED
        - PVC_VOICE_STATE_TRAINING
        - PVC_VOICE_STATE_READY
        - PVC_VOICE_STATE_FAILED
      description: >-
        Lifecycle state of a PVC voice.


        - `PVC_VOICE_STATE_DRAFT`: Editable. Samples can be added, trimmed, or
        removed, and metadata can be updated.

        - `PVC_VOICE_STATE_QUEUED`: Training requested; waiting for a training
        slot.

        - `PVC_VOICE_STATE_TRAINING`: Actively training.

        - `PVC_VOICE_STATE_READY`: Training succeeded. Usable for TTS synthesis;
        permanent — cannot be deleted through this API.

        - `PVC_VOICE_STATE_FAILED`: Training failed. Editing the voice (e.g.
        renaming it, or adding/removing a sample) returns it to
        `PVC_VOICE_STATE_DRAFT` with its remaining samples intact.
    inworldvoicev1PvcVoiceFailure:
      type: object
      properties:
        reason:
          type: string
          description: >-
            Machine-readable failure code, e.g. `TRAINING_ERROR`. New values may
            be added over time, so don't validate against a hardcoded list —
            fall back to displaying `message` for codes you don't recognize.
        message:
          type: string
          description: >-
            Human-readable, scrubbed failure message. Never contains uploaded
            audio, filenames, or transcripts.
      description: Populated on a PVC voice when its `state` is `PVC_VOICE_STATE_FAILED`.
    inworldvoicev1PvcVoiceSample:
      type: object
      properties:
        sampleId:
          type: string
          description: >-
            Sample ID. Use this value as `{sampleId}` when trimming or deleting
            the sample.
          readOnly: true
        name:
          type: string
          description: >-
            Resource name. Format:
            `workspaces/{workspace}/pvcVoices/{voice}/samples/{sample}`.
          readOnly: true
        sizeBytes:
          type: integer
          format: int64
          description: Size of the uploaded file, in bytes.
          readOnly: true
        durationSecs:
          type: number
          format: float
          description: >-
            Analyzed duration of the sample, in seconds, before any trim is
            applied.
          readOnly: true
        mimeType:
          type: string
          enum:
            - audio/wav
            - audio/webm
            - audio/mpeg
          description: Detected audio format, sniffed from the file's byte content.
          readOnly: true
        hash:
          type: string
          description: >-
            Base64-encoded MD5 of the stored object, for verifying upload
            integrity against the source file.
          readOnly: true
        trimStartMs:
          type: integer
          format: int32
          nullable: true
          description: Trim start offset in milliseconds, if set.
        trimEndMs:
          type: integer
          format: int32
          nullable: true
          description: Trim end offset in milliseconds, if set.
      description: A single uploaded audio sample belonging to a PVC voice.
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
          description: >-
            A URL/resource name that uniquely identifies the type of the
            serialized protocol buffer message.
      additionalProperties: {}
      description: >-
        `Any` contains an arbitrary serialized protocol buffer message along
        with a URL that describes the type of the serialized message.
  securitySchemes:
    inworld_basic:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your [API key](../../../api-reference/introduction). Read permissions
        are required for GET endpoints. Write permissions are required for POST,
        PATCH, and DELETE endpoints.

         For Basic authentication, please populate `Basic $INWORLD_API_KEY`. You can create a key in one command with the [Inworld CLI](../../../tts/resources/inworld-cli): `inworld workspace add-key`.

````