{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Voice Cloning
Upload Voice Sample
Upload voice sample for cloning.
POST
/
api
/
v1
/
assistants
/
{assistant_id}
/
voice-samples
/
upload
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}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.
413 Payload Too Large - File exceeds size limit:
422 Unprocessable Entity - Invalid audio format:
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 asmultipart/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.Response
{
"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
cURL
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:{
"detail": "File too large (max 50MB)"
}
{
"detail": "Audio file exceeds maximum size limit"
}
{
"detail": "Unsupported audio format: audio/mpeg3"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
multipart/form-data
Response
Successful Response
⌘I