Skip to main content
GET
/
api
/
v1
/
agents
/
voices
Get voices
curl --request GET \
  --url https://api.elemente.ai/api/v1/agents/voices \
  --header 'Authorization: Basic <encoded-value>'
import requests

url = "https://api.elemente.ai/api/v1/agents/voices"

headers = {"Authorization": "Basic <encoded-value>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};

fetch('https://api.elemente.ai/api/v1/agents/voices', 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.elemente.ai/api/v1/agents/voices",
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: Basic <encoded-value>"
],
]);

$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.elemente.ai/api/v1/agents/voices"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Basic <encoded-value>")

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.elemente.ai/api/v1/agents/voices")
.header("Authorization", "Basic <encoded-value>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.elemente.ai/api/v1/agents/voices")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'

response = http.request(request)
puts response.read_body
[
  {
    "name": "Jane",
    "voiceId": "1234567890",
    "gender": "female",
    "status": true,
    "language": "en-US"
  }
]

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Response

The list of available voices

name
string | null
required

The name of the voice

Example:

"Jane"

voiceId
string | null
required

The id of the voice

Example:

"1234567890"

gender
string | null
required

The gender of the voice

Example:

"female"

status
boolean
required

The status of the voice

Example:

true

language
string | null
required

The language of the voice

Example:

"en-US"