> ## 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.

# Start Voice Clip Upload

> Start a resumable upload and return presigned PUT URLs for every part.

All part URLs are returned up front rather than in batches: they share a single expiry,
so batching would add round trips without extending the usable window. Use Get Upload
Parts to resume, or to re-sign after the URLs expire.



## OpenAPI

````yaml https://api.usetuner.ai/public/openapi.json post /api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads
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: scenarios
    x-group: Scenarios
  - name: traces
    x-group: Traces
  - name: providers
    x-group: Providers
paths:
  /api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads:
    post:
      tags:
        - simulation
      summary: Start Voice Clip Upload
      description: >-
        Start a resumable upload and return presigned PUT URLs for every part.


        All part URLs are returned up front rather than in batches: they share a
        single expiry,

        so batching would add round trips without extending the usable window.
        Use Get Upload

        Parts to resume, or to re-sign after the URLs expire.
      operationId: >-
        create_voice_clip_upload_api_v1_workspaces__workspace_id__agents__agent_id__voice_clip_uploads_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/VoiceClipUploadCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceClipUploadCreateResponse'
        '400':
          description: Unsupported extension, or a declared size above the 200 MB ceiling.
          content:
            application/json:
              example:
                detail: 'Unsupported extension ''flac''. Allowed: [''m4a'', ''mp3'', ''wav'']'
              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, or the
            workspace lacks credits for uploaded-audio analysis.
          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'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '503':
          description: The S3 upload signer is not configured in this environment.
          content:
            application/json:
              example:
                detail: Audio uploads are not available in this environment.
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - Bearer: []
components:
  schemas:
    VoiceClipUploadCreateRequest:
      properties:
        filename:
          type: string
          maxLength: 512
          minLength: 1
          title: Filename
        extension:
          type: string
          maxLength: 10
          minLength: 1
          title: Extension
        size_bytes:
          type: integer
          maximum: 209715200
          exclusiveMinimum: 0
          title: Size Bytes
      type: object
      required:
        - filename
        - extension
        - size_bytes
      title: VoiceClipUploadCreateRequest
      description: >-
        Input schema for starting a resumable upload.


        `size_bytes` is the client's declared size. It is what the part plan is
        computed from

        and what the size gate rejects on; S3 is still the authority on what
        actually landed.
    VoiceClipUploadCreateResponse:
      properties:
        id:
          type: integer
          title: Id
        status:
          type: string
          title: Status
        filename:
          type: string
          title: Filename
        extension:
          type: string
          title: Extension
        size_bytes:
          type: integer
          title: Size Bytes
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
        channel_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Channel Count
        channel_mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel Mode
        speakers:
          anyOf:
            - items:
                $ref: '#/components/schemas/VoiceClipUploadSpeaker'
              type: array
            - type: 'null'
          title: Speakers
        failure_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Failure Reason
        created_at:
          type: string
          format: date-time
          title: Created At
        part_size_bytes:
          type: integer
          title: Part Size Bytes
        parts:
          items:
            $ref: '#/components/schemas/VoiceClipUploadPart'
          type: array
          title: Parts
        expires_at:
          type: string
          format: date-time
          title: Expires At
      type: object
      required:
        - id
        - status
        - filename
        - extension
        - size_bytes
        - created_at
        - part_size_bytes
        - expires_at
      title: VoiceClipUploadCreateResponse
      description: >-
        The create response: the upload plus everything needed to start pushing
        bytes.
    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
    VoiceClipUploadSpeaker:
      properties:
        index:
          type: integer
          title: Index
        label:
          type: string
          title: Label
      type: object
      required:
        - index
        - label
      title: VoiceClipUploadSpeaker
      description: >-
        One channel as the picker shows it; the sample's S3 key is never
        exposed.
    VoiceClipUploadPart:
      properties:
        part_number:
          type: integer
          minimum: 1
          title: Part Number
          description: 1-based part index.
        url:
          type: string
          title: Url
          description: Presigned PUT URL. Treat as a credential; do not log.
      type: object
      required:
        - part_number
        - url
      title: VoiceClipUploadPart
      description: One part of the multipart upload, as offered to the client.
    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

````

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