Clone Voice
curl --request POST \
--url https://api.bland.ai/v1/voices/clone \
--header 'Content-Type: multipart/form-data' \
--header 'authorization: <authorization>' \
--form 'name=<string>' \
--form 'gender=<string>' \
--form 'description=<string>' \
--form isBTTS_V3=true \
--form isBTTS_V2=true \
--form audio_samples.items='@example-file'import requests
url = "https://api.bland.ai/v1/voices/clone"
files = { "audio_samples.items": ("example-file", open("example-file", "rb")) }
payload = {
"name": "<string>",
"gender": "<string>",
"description": "<string>",
"isBTTS_V3": "true",
"isBTTS_V2": "true"
}
headers = {"authorization": "<authorization>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('name', '<string>');
form.append('gender', '<string>');
form.append('description', '<string>');
form.append('isBTTS_V3', 'true');
form.append('isBTTS_V2', 'true');
form.append('audio_samples.items', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {authorization: '<authorization>'}};
options.body = form;
fetch('https://api.bland.ai/v1/voices/clone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bland.ai/v1/voices/clone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isBTTS_V3\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isBTTS_V2\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_samples.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/voices/clone"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isBTTS_V3\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isBTTS_V2\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_samples.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bland.ai/v1/voices/clone")
.header("authorization", "<authorization>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isBTTS_V3\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isBTTS_V2\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_samples.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/voices/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isBTTS_V3\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isBTTS_V2\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_samples.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"status": 200,
"data": {
"voice_id": "4cc89edf-c4b7-4df8-98c5-f8548fcd7c62",
"name": "DocTestClone"
},
"errors": null
}
{
"status": 400,
"data": null,
"errors": [
{ "error": "Validation Error", "message": "No files provided for voice cloning." }
]
}
{
"status": 400,
"data": null,
"errors": [
{ "error": "Limit Exceeded", "message": "You have reached the maximum number of voices for your plan." }
]
}
Voice Cloning
Clone Voice
Create a custom voice clone from audio samples.
POST
/
v1
/
voices
/
clone
Clone Voice
curl --request POST \
--url https://api.bland.ai/v1/voices/clone \
--header 'Content-Type: multipart/form-data' \
--header 'authorization: <authorization>' \
--form 'name=<string>' \
--form 'gender=<string>' \
--form 'description=<string>' \
--form isBTTS_V3=true \
--form isBTTS_V2=true \
--form audio_samples.items='@example-file'import requests
url = "https://api.bland.ai/v1/voices/clone"
files = { "audio_samples.items": ("example-file", open("example-file", "rb")) }
payload = {
"name": "<string>",
"gender": "<string>",
"description": "<string>",
"isBTTS_V3": "true",
"isBTTS_V2": "true"
}
headers = {"authorization": "<authorization>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('name', '<string>');
form.append('gender', '<string>');
form.append('description', '<string>');
form.append('isBTTS_V3', 'true');
form.append('isBTTS_V2', 'true');
form.append('audio_samples.items', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {authorization: '<authorization>'}};
options.body = form;
fetch('https://api.bland.ai/v1/voices/clone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bland.ai/v1/voices/clone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isBTTS_V3\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isBTTS_V2\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_samples.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/voices/clone"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isBTTS_V3\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isBTTS_V2\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_samples.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bland.ai/v1/voices/clone")
.header("authorization", "<authorization>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isBTTS_V3\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isBTTS_V2\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_samples.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/voices/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isBTTS_V3\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isBTTS_V2\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_samples.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"status": 200,
"data": {
"voice_id": "4cc89edf-c4b7-4df8-98c5-f8548fcd7c62",
"name": "DocTestClone"
},
"errors": null
}
{
"status": 400,
"data": null,
"errors": [
{ "error": "Validation Error", "message": "No files provided for voice cloning." }
]
}
{
"status": 400,
"data": null,
"errors": [
{ "error": "Limit Exceeded", "message": "You have reached the maximum number of voices for your plan." }
]
}
Overview
Creates a Bland TTS voice clone from one or more audio samples. Sent asmultipart/form-data. The new voice is private to your org and immediately usable with Speak.
Two cloning engines are available, selectable per request:
- BTTS V3 (default), single 10-second sample, 17+ languages, highest fidelity. Returned
service: "BTTS_V3". - BTTS V2, exactly 1 WAV file, 17+ languages. Returned
service: "BTTS_V2".
Headers
Your API key for authentication.
Form Fields
Display name for the voice clone. 1-30 characters. Must be unique in your library.
Audio file or files. Constraints depend on the engine flag (see below). WAV format recommended.
male or female. Optional but recommended; helps the underlying model.Free-text description. Surfaced as additional context to the model for tone and style.
Use the V3 engine. Default if no engine flag is set. Pass
"true" as a multipart string.Use the V2 engine instead of V3. Pass
"true" as a multipart string.Engine constraints
Each engine validatesaudio_samples differently. Mismatched files will return a Validation Error before the clone is created.
V3 (default)
V3 (default)
- Exactly 1 audio file.
- Roughly 10 seconds is ideal.
- Max 10 MB.
- 17+ languages supported.
V2 (isBTTS_V2=true)
V2 (isBTTS_V2=true)
- Exactly 1 audio file.
- Roughly 10 seconds is ideal.
- Max 10 MB.
- 17+ languages supported.
Response
Returns200 OK with the new voice on success.
The display name you provided.
null on success.{
"status": 200,
"data": {
"voice_id": "4cc89edf-c4b7-4df8-98c5-f8548fcd7c62",
"name": "DocTestClone"
},
"errors": null
}
{
"status": 400,
"data": null,
"errors": [
{ "error": "Validation Error", "message": "No files provided for voice cloning." }
]
}
{
"status": 400,
"data": null,
"errors": [
{ "error": "Limit Exceeded", "message": "You have reached the maximum number of voices for your plan." }
]
}
V2 and V3 voices are single-sample by design. Use List Voice Samples to inspect the source sample attached to a voice.
Docs for agents: llms.txt
Was this page helpful?
⌘I