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

# Add samples to PVC voice

> Add audio samples to a PVC voice



## OpenAPI

````yaml /api-reference/openapi.json post /v1/voices/pvc/{voice_id}/samples
openapi: 3.1.0
info:
  title: Threetone API
  description: >-
    APIs for the Threetone Agents Platform and shared workspace resources.
    Authenticate programmatic requests with an API key in the x-api-key header.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/voices/pvc/{voice_id}/samples:
    post:
      tags:
        - Voices
      summary: Add samples to PVC voice
      description: Add audio samples to a PVC voice
      operationId: add_pvc_voice_samples
      parameters:
        - name: voice_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              Voice ID to be used, you can use GET /v1/voices to list all the
              available voices.
            examples:
              - 21m00Tcm4TlvDq8ikWAM
            title: Voice Id
          description: >-
            Voice ID to be used, you can use GET /v1/voices to list all the
            available voices.
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_Add_samples_to_PVC_voice_v1_voices_pvc__voice_id__samples_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SampleResponseModel'
                title: >-
                  Response Add Samples To Pvc Voice V1 Voices Pvc  Voice Id 
                  Samples Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_Add_samples_to_PVC_voice_v1_voices_pvc__voice_id__samples_post:
      properties:
        files:
          items:
            type: string
            format: binary
          type: array
          title: Files
          description: Audio files used to create the voice.
        remove_background_noise:
          type: boolean
          title: Remove Background Noise
          description: >-
            If set will remove background noise for voice samples using our
            audio isolation model. If the samples do not include background
            noise, it can make the quality worse.
          default: false
          examples:
            - true
      type: object
      required:
        - files
      title: Body_Add_samples_to_PVC_voice_v1_voices_pvc__voice_id__samples_post
    SampleResponseModel:
      properties:
        sample_id:
          type: string
          title: Sample Id
          description: The ID of the sample.
        file_name:
          type: string
          title: File Name
          description: The name of the sample file.
        mime_type:
          type: string
          title: Mime Type
          description: The MIME type of the sample file.
        size_bytes:
          type: integer
          title: Size Bytes
          description: The size of the sample file in bytes.
        hash:
          type: string
          title: Hash
          description: The hash of the sample file.
        duration_secs:
          anyOf:
            - type: number
            - type: 'null'
          title: Duration Secs
        remove_background_noise:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Remove Background Noise
        has_isolated_audio:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Isolated Audio
        has_isolated_audio_preview:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Isolated Audio Preview
        speaker_separation:
          anyOf:
            - $ref: '#/components/schemas/SpeakerSeparationResponseModel'
            - type: 'null'
        trim_start:
          anyOf:
            - type: integer
            - type: 'null'
          title: Trim Start
        trim_end:
          anyOf:
            - type: integer
            - type: 'null'
          title: Trim End
      type: object
      required:
        - sample_id
        - file_name
        - mime_type
        - size_bytes
        - hash
      title: SampleResponseModel
      example:
        file_name: sample.mp3
        hash: '1234567890'
        mime_type: audio/mpeg
        sample_id: DCwhRBWXzGAHq8TQ4Fs18
        size_bytes: 1000000
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SpeakerSeparationResponseModel:
      properties:
        voice_id:
          type: string
          title: Voice Id
          description: The ID of the voice.
        sample_id:
          type: string
          title: Sample Id
          description: The ID of the sample.
        status:
          type: string
          enum:
            - not_started
            - pending
            - completed
            - failed
          title: Status
          description: The status of the speaker separation.
        speakers:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/SpeakerResponseModel'
              type: object
            - type: 'null'
          title: Speakers
          description: The speakers of the sample.
        selected_speaker_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Selected Speaker Ids
          description: The IDs of the selected speakers.
      type: object
      required:
        - voice_id
        - sample_id
        - status
      title: SpeakerSeparationResponseModel
      example:
        sample_id: DCwhRBWXzGAHq8TQ4Fs18
        status: not_started
        voice_id: DCwhRBWXzGAHq8TQ4Fs18
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    SpeakerResponseModel:
      properties:
        speaker_id:
          type: string
          title: Speaker Id
          description: The ID of the speaker.
        duration_secs:
          type: number
          title: Duration Secs
          description: The duration of the speaker segment in seconds.
        utterances:
          anyOf:
            - items:
                $ref: '#/components/schemas/UtteranceResponseModel'
              type: array
            - type: 'null'
          title: Utterances
          description: The utterances of the speaker.
      type: object
      required:
        - speaker_id
        - duration_secs
      title: SpeakerResponseModel
      example:
        duration_secs: 5
        speaker_id: DCwhRBWXzGAHq8TQ4Fs18
    UtteranceResponseModel:
      properties:
        start:
          type: number
          title: Start
          description: The start time of the utterance in seconds.
        end:
          type: number
          title: End
          description: The end time of the utterance in seconds.
      type: object
      required:
        - start
        - end
      title: UtteranceResponseModel
      example:
        end: 1
        start: 0

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.