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

# Upload Voice Sample

> Upload voice sample for cloning.

This endpoint allows you to upload audio samples for voice cloning. The uploaded sample will be processed and prepared for creating cloned voices using supported TTS providers.

### Path Parameters

* `assistant_id` (integer, **required**): The unique identifier of the assistant to associate the voice sample with.

### Form Data

The request must be sent as `multipart/form-data`.

* `file` (file, **required**): The audio file to upload. Supported formats: MP3, WAV, FLAC, M4A, OGG.
* `name` (string, optional): Custom name for the voice sample. Defaults to filename if not provided.
* `description` (string, optional): Description of the voice sample.
* `tags` (string, optional): Comma-separated tags for organizing voice samples.

### File Requirements

* **Formats**: MP3, WAV, FLAC, M4A, OGG
* **Size**: Maximum 50MB
* **Duration**: 10 seconds to 10 minutes
* **Quality**: 22kHz+ sample rate, 128kbps+ bit rate recommended
* **Content**: Clear speech, single speaker, minimal background noise

### Response

A successful upload returns the voice sample object with processing status.

```json Response theme={null}
{
  "success": true,
  "voice_sample": {
    "id": 123,
    "name": "Professional Voice Sample",
    "filename": "professional_voice.wav",
    "status": "uploaded",
    "created_at": "2024-01-15T10:30:00Z"
  }
}
```

### Example Request

```bash cURL theme={null}
curl -X POST "https://api.burki.dev/api/v1/assistants/123/voice-samples/upload" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@voice_sample.wav" \
  -F "name=Professional Voice" \
  -F "description=Clear professional speaking voice" \
  -F "tags=professional,clear,business"
```

### Error Responses

**400 Bad Request** - Invalid file or parameters:

```json theme={null}
{
  "detail": "File too large (max 50MB)"
}
```

**413 Payload Too Large** - File exceeds size limit:

```json theme={null}
{
  "detail": "Audio file exceeds maximum size limit"
}
```

**422 Unprocessable Entity** - Invalid audio format:

```json theme={null}
{
  "detail": "Unsupported audio format: audio/mpeg3"
}
```


## OpenAPI

````yaml POST /api/v1/assistants/{assistant_id}/voice-samples/upload
openapi: 3.1.0
info:
  title: Burki
  description: A system that uses AI to answer customer Calls.
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/assistants/{assistant_id}/voice-samples/upload:
    post:
      tags:
        - assistants
      summary: Upload Voice Sample
      description: Upload voice sample for cloning.
      operationId: >-
        upload_voice_sample_api_v1_assistants__assistant_id__voice_samples_upload_post
      parameters:
        - name: assistant_id
          in: path
          required: true
          schema:
            type: integer
            title: Assistant Id
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_upload_voice_sample_api_v1_assistants__assistant_id__voice_samples_upload_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    Body_upload_voice_sample_api_v1_assistants__assistant_id__voice_samples_upload_post:
      properties:
        file:
          type: string
          format: binary
          title: File
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        tags:
          anyOf:
            - type: string
            - type: 'null'
          title: Tags
      type: object
      required:
        - file
      title: >-
        Body_upload_voice_sample_api_v1_assistants__assistant_id__voice_samples_upload_post
    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
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````