Get the organization's ElevenLabs API key status
curl --request GET \
--url https://api.anam.ai/v1/voices/elevenlabs-key \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.anam.ai/v1/voices/elevenlabs-key"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.anam.ai/v1/voices/elevenlabs-key', 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.anam.ai/v1/voices/elevenlabs-key",
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: Bearer <token>"
],
]);
$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.anam.ai/v1/voices/elevenlabs-key"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.anam.ai/v1/voices/elevenlabs-key")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/voices/elevenlabs-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"enabled": true,
"saved": true,
"hint": "<string>",
"voiceCount": 123,
"lastValidatedAt": "2023-11-07T05:31:56Z",
"lastUsedAt": "2023-11-07T05:31:56Z"
}{
"code": "invalid_request",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"docsUrl": "<string>",
"details": {}
}{
"code": "invalid_request",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"docsUrl": "<string>",
"details": {}
}get ElevenLabs API key status
Whether the organization can import voices with its own ElevenLabs API key (enabled) and which key is saved. Never returns the key, only its last four characters. Answered even when the feature is off, because voices that already use a key still depend on it.
GET
/
v1
/
voices
/
elevenlabs-key
Get the organization's ElevenLabs API key status
curl --request GET \
--url https://api.anam.ai/v1/voices/elevenlabs-key \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.anam.ai/v1/voices/elevenlabs-key"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.anam.ai/v1/voices/elevenlabs-key', 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.anam.ai/v1/voices/elevenlabs-key",
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: Bearer <token>"
],
]);
$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.anam.ai/v1/voices/elevenlabs-key"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.anam.ai/v1/voices/elevenlabs-key")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/voices/elevenlabs-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"enabled": true,
"saved": true,
"hint": "<string>",
"voiceCount": 123,
"lastValidatedAt": "2023-11-07T05:31:56Z",
"lastUsedAt": "2023-11-07T05:31:56Z"
}{
"code": "invalid_request",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"docsUrl": "<string>",
"details": {}
}{
"code": "invalid_request",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"docsUrl": "<string>",
"details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
The key status.
Whether this organization can save a key and import voices with useOrganizationKey.
Whether a key is saved.
The saved key's last four characters.
Voices that speak with the key.
When Anam last checked the key with ElevenLabs.
When a session last started with the key, recorded at most hourly.
Was this page helpful?

