{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Voice Cloning
Create Cloned Voice
Create cloned voice from uploaded sample.
POST
/
api
/
v1
/
assistants
/
{assistant_id}
/
cloned-voices
/
create
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}This endpoint creates a cloned voice from an uploaded voice sample using the specified TTS provider. The cloning process varies by provider but typically completes within seconds to minutes.
404 Not Found - Voice sample not found:
500 Internal Server Error - Provider cloning failed:
Path Parameters
assistant_id(integer, required): The unique identifier of the assistant to associate the cloned voice with.
Request Body
The request body is a JSON object containing cloning configuration.voice_sample_id(integer, required): ID of the uploaded voice sample to clone fromprovider(string, required): TTS provider to use for voice cloning- Common values:
elevenlabs,resemble,cartesia. The providers endpoint returns the current supported set.
- Common values:
name(string, required): Display name for the cloned voicedescription(string, optional): Description of the cloned voicelanguage(string, optional): Language code (e.g.,en,es,fr)enhance_quality(boolean, optional): Whether to apply quality enhancement. Default:truetags(array of strings, optional): Tags for organizing cloned voicesmetadata(object, optional): Additional provider-specific metadata
Example Request
Request
{
"voice_sample_id": 123,
"provider": "elevenlabs",
"name": "Custom Professional Voice",
"description": "Professional voice for customer service interactions",
"language": "en",
"enhance_quality": true,
"tags": ["professional", "customer-service"],
"metadata": {
"use_case": "customer_support"
}
}
Response
A successful request returns the cloned voice object with initial status.Response
{
"success": true,
"cloned_voice": {
"id": 456,
"name": "Custom Professional Voice",
"provider": "elevenlabs",
"provider_voice_id": "voice_abc123xyz",
"status": "processing",
"created_at": "2024-01-15T10:45:00Z"
}
}
Response Fields
id(integer): Unique identifier for the cloned voicename(string): Display name of the cloned voiceprovider(string): TTS provider used for cloningprovider_voice_id(string): Provider-specific voice identifierstatus(string): Current cloning statuscreated_at(string): ISO 8601 timestamp of creation
Cloning Status
processing: Voice cloning is in progressready: Voice is successfully cloned and ready for usefailed: Voice cloning failed, check error details
Provider-Specific Behavior
ElevenLabs
- Processing Time: Usually 5-30 seconds
- Instant Preview: Voice ready for immediate testing
- Voice ID: Returns ElevenLabs voice ID for direct API usage
- Quality: High-quality instant cloning from short samples
Resemble AI
- Processing Time: 2-10 minutes for training
- Professional Quality: Advanced training algorithms
- Voice UUID: Returns Resemble voice UUID
- Customization: Supports advanced voice customization options
Example Requests
ElevenLabs Voice Cloning
curl -X POST "https://api.burki.dev/api/v1/assistants/123/cloned-voices/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"voice_sample_id": 123,
"provider": "elevenlabs",
"name": "ElevenLabs Professional Voice",
"language": "en",
"enhance_quality": true
}'
Resemble AI Voice Cloning
curl -X POST "https://api.burki.dev/api/v1/assistants/123/cloned-voices/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"voice_sample_id": 123,
"provider": "resemble",
"name": "Resemble Custom Voice",
"description": "High-quality professional voice",
"enhance_quality": true,
"tags": ["professional", "brand"]
}'
Error Responses
400 Bad Request - Invalid parameters:{
"detail": "Provider 'invalid_provider' is not supported"
}
{
"detail": "Voice sample with ID 123 not found"
}
{
"detail": "Voice cloning failed: Insufficient account balance"
}
Best Practices
- Provider Selection: Choose ElevenLabs for quick prototyping, Resemble for production quality
- Naming Convention: Use descriptive names that indicate voice characteristics
- Quality Settings: Enable quality enhancement for better results
- Monitoring: Check cloning status regularly for large-scale operations
- Error Handling: Implement retry logic for transient provider failures
Authorizations
Body
application/json
Schema for creating a cloned voice.
Response
Successful Response
⌘I