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

# Create Voice Clip Set

> Create a voice clip set from a source call and queue it for extraction.

Returns immediately with the set in `extracting` status -- the caller-turn
audio is sliced out asynchronously. Poll List/Get Voice Clip Set for progress.



## OpenAPI

````yaml https://api.usetuner.ai/public/openapi.json post /api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-sets
openapi: 3.1.0
info:
  title: My Public API
  version: 1.0.0
servers:
  - url: https://api.usetuner.ai
security: []
tags:
  - name: calls
    x-group: Calls
  - name: workspaces
    x-group: Workspaces
  - name: simulation
    x-group: Simulation
  - name: agent-settings
    x-group: Agent Settings
  - name: agents
    x-group: Agents
  - name: traces
    x-group: Traces
  - name: providers
    x-group: Providers
paths:
  /api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-sets:
    post:
      tags:
        - simulation
      summary: Create Voice Clip Set
      description: >-
        Create a voice clip set from a source call and queue it for extraction.


        Returns immediately with the set in `extracting` status -- the
        caller-turn

        audio is sliced out asynchronously. Poll List/Get Voice Clip Set for
        progress.
      operationId: >-
        create_voice_clip_set_api_v1_workspaces__workspace_id__agents__agent_id__voice_clip_sets_post
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: integer
            description: Tuner's internal numeric ID for the agent.
            title: Agent Id
          description: Tuner's internal numeric ID for the agent.
        - name: workspace_id
          in: path
          required: true
          schema:
            type: integer
            description: Workspace ID. Find this in Workspace > General Settings.
            title: Workspace Id
          description: Workspace ID. Find this in Workspace > General Settings.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoiceClipSetCreateRequest'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceClipSetResponse'
        '400':
          description: '`source_call_id` does not exist, or belongs to a different agent.'
          content:
            application/json:
              example:
                detail: Call with ID 123 not found for this agent.
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              example:
                detail: Not authenticated
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Simulation is not included in the workspace's current plan.
          content:
            application/json:
              example:
                detail: Simulation not included in your current plan.
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: You do not have access to this workspace.
          content:
            application/json:
              example:
                detail: User does not have access to workspace 42
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Agent not found.
          content:
            application/json:
              example:
                detail: Agent with ID 17 not found
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: A voice clip set with this name already exists for this agent.
          content:
            application/json:
              example:
                detail: >-
                  A voice clip set named 'Angry customer' already exists for
                  this agent.
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
components:
  schemas:
    VoiceClipSetCreateRequest:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        description:
          anyOf:
            - type: string
              maxLength: 10000
            - type: 'null'
          title: Description
        source_call_id:
          type: integer
          exclusiveMinimum: 0
          title: Source Call Id
        extraction_settings:
          anyOf:
            - additionalProperties:
                type: integer
              type: object
            - type: 'null'
          title: Extraction Settings
          description: >-
            Optional overrides for merge_gap_ms/min_turn_ms/pad_ms, consumed by
            the extractor. Omit to use its defaults.
      type: object
      required:
        - name
        - source_call_id
      title: VoiceClipSetCreateRequest
      description: >-
        Input schema for creating a voice clip set.


        Creation only writes the row and enqueues extraction — the clips
        themselves are

        produced asynchronously by the voice-clip-extractor Lambda, which is why
        this

        schema carries no clip data.
    VoiceClipSetResponse:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        status:
          type: string
          title: Status
        clip_count:
          type: integer
          title: Clip Count
        total_duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Duration Ms
        caller_track_duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Caller Track Duration Ms
        source_call_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Source Call Id
        source_channel_mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Channel Mode
        failure_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Failure Reason
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - name
        - status
        - clip_count
        - created_at
      title: VoiceClipSetResponse
      description: Response schema for a single voice clip set (without its clips).
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Human-readable description of what went wrong.
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Error body returned when a request fails.
    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
  securitySchemes:
    Bearer:
      type: http
      description: >-
        Use Tuner API key (tr_api_...) or user session token. Find your API key
        in Workspace Settings > API Keys.
      scheme: bearer

````