List Voice Samples
curl --request GET \
--url https://api.bland.ai/v1/voices/{id}/samples \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v1/voices/{id}/samples"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v1/voices/{id}/samples', 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/{id}/samples",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/voices/{id}/samples"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://api.bland.ai/v1/voices/{id}/samples")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/voices/{id}/samples")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"samples": []
}
{
"data": null,
"errors": [
{ "error": "VOICE_SAMPLES_ERROR", "message": "Voice is a default voice and not owned by the user." }
]
}
Samples
List Voice Samples
List the training samples attached to a voice clone you own.
GET
/
v1
/
voices
/
{id}
/
samples
List Voice Samples
curl --request GET \
--url https://api.bland.ai/v1/voices/{id}/samples \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v1/voices/{id}/samples"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v1/voices/{id}/samples', 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/{id}/samples",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/voices/{id}/samples"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://api.bland.ai/v1/voices/{id}/samples")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/voices/{id}/samples")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"samples": []
}
{
"data": null,
"errors": [
{ "error": "VOICE_SAMPLES_ERROR", "message": "Voice is a default voice and not owned by the user." }
]
}
Overview
Returns the training samples used to create a voice clone. Only voices owned by your org return samples; default voices and shared library voices return400 VOICE_SAMPLES_ERROR with the message "Voice is a default voice and not owned by the user."
Retrievable samples are only present for V1 (BTTS) voices. V2 and V3 voices both return [] even though they were cloned from a sample, because the underlying single source clip is not exposed via this endpoint. Use the source audio of your original clone for those.
Headers
string
required
Your API key for authentication.
Path Parameters
string
required
UUID of the voice.
Query Parameters
boolean
default:"false"
When
true, includes base64-encoded audio data with each sample. Increases response size significantly. Use Get Voice Sample for a single sample with audio instead.Response
array
Array of training sample records. Empty array for V3 voices.
{
"samples": []
}
{
"data": null,
"errors": [
{ "error": "VOICE_SAMPLES_ERROR", "message": "Voice is a default voice and not owned by the user." }
]
}
Docs for agents: llms.txt
Was this page helpful?