Voice Design
Lister les voix candidates
Vérifiez si un candidat est prêt, ou listez vos candidats.
GET
/
voice-generator
/
embeddings
List Voice Candidates
curl --request GET \
--url https://api.gradium.ai/api/voice-generator/embeddings \
--header 'x-api-key: <api-key>'import requests
url = "https://api.gradium.ai/api/voice-generator/embeddings"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.gradium.ai/api/voice-generator/embeddings', 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.gradium.ai/api/voice-generator/embeddings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.gradium.ai/api/voice-generator/embeddings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.gradium.ai/api/voice-generator/embeddings")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gradium.ai/api/voice-generator/embeddings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"embeddings": [
{
"embedding_id": "<string>",
"ready": true,
"prompt": "<string>",
"language": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"kind": "generate",
"generate_config": {
"prompt": "<string>",
"language": "<string>"
},
"edit_language_config": {
"src_voice": "<string>",
"src_language": "<string>",
"target_language": "<string>",
"accent": "<string>",
"gender": "male"
},
"enhance_config": {
"src_voice": "<string>",
"src_language": "<string>"
}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Autorisations
API key for authentication. Passed via the x-api-key header.
Paramètres de requête
Look up a single candidate by id. Omit to list all candidates.
Plage requise:
x >= 0Plage requise:
1 <= x <= 1000Réponse
Successful Response
Matching candidates, newest first. An id this organization does not hold returns an empty list, so check the list before indexing into it.
Show child attributes
Show child attributes
⌘I
List Voice Candidates
curl --request GET \
--url https://api.gradium.ai/api/voice-generator/embeddings \
--header 'x-api-key: <api-key>'import requests
url = "https://api.gradium.ai/api/voice-generator/embeddings"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.gradium.ai/api/voice-generator/embeddings', 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.gradium.ai/api/voice-generator/embeddings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.gradium.ai/api/voice-generator/embeddings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.gradium.ai/api/voice-generator/embeddings")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gradium.ai/api/voice-generator/embeddings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"embeddings": [
{
"embedding_id": "<string>",
"ready": true,
"prompt": "<string>",
"language": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"kind": "generate",
"generate_config": {
"prompt": "<string>",
"language": "<string>"
},
"edit_language_config": {
"src_voice": "<string>",
"src_language": "<string>",
"target_language": "<string>",
"accent": "<string>",
"gender": "male"
},
"enhance_config": {
"src_voice": "<string>",
"src_language": "<string>"
}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}