ElevenLabs Voice Create
curl --request POST \
--url https://api.aihubmax.com/e/v1/audios/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "elevenlabs-voice-create",
"voice_name": "温暖中文旁白",
"voice_description": "自然、温暖、清晰的成年中文旁白声音,适合长篇讲解。",
"generated_voice_id": "selected-generated-voice-id",
"labels": {
"language": "zh"
}
}
'import requests
url = "https://api.aihubmax.com/e/v1/audios/generations"
payload = {
"model": "elevenlabs-voice-create",
"voice_name": "温暖中文旁白",
"voice_description": "自然、温暖、清晰的成年中文旁白声音,适合长篇讲解。",
"generated_voice_id": "selected-generated-voice-id",
"labels": { "language": "zh" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'elevenlabs-voice-create',
voice_name: '温暖中文旁白',
voice_description: '自然、温暖、清晰的成年中文旁白声音,适合长篇讲解。',
generated_voice_id: 'selected-generated-voice-id',
labels: {language: 'zh'}
})
};
fetch('https://api.aihubmax.com/e/v1/audios/generations', 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.aihubmax.com/e/v1/audios/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'elevenlabs-voice-create',
'voice_name' => '温暖中文旁白',
'voice_description' => '自然、温暖、清晰的成年中文旁白声音,适合长篇讲解。',
'generated_voice_id' => 'selected-generated-voice-id',
'labels' => [
'language' => 'zh'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.aihubmax.com/e/v1/audios/generations"
payload := strings.NewReader("{\n \"model\": \"elevenlabs-voice-create\",\n \"voice_name\": \"温暖中文旁白\",\n \"voice_description\": \"自然、温暖、清晰的成年中文旁白声音,适合长篇讲解。\",\n \"generated_voice_id\": \"selected-generated-voice-id\",\n \"labels\": {\n \"language\": \"zh\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.aihubmax.com/e/v1/audios/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"elevenlabs-voice-create\",\n \"voice_name\": \"温暖中文旁白\",\n \"voice_description\": \"自然、温暖、清晰的成年中文旁白声音,适合长篇讲解。\",\n \"generated_voice_id\": \"selected-generated-voice-id\",\n \"labels\": {\n \"language\": \"zh\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aihubmax.com/e/v1/audios/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"elevenlabs-voice-create\",\n \"voice_name\": \"温暖中文旁白\",\n \"voice_description\": \"自然、温暖、清晰的成年中文旁白声音,适合长篇讲解。\",\n \"generated_voice_id\": \"selected-generated-voice-id\",\n \"labels\": {\n \"language\": \"zh\"\n }\n}"
response = http.request(request)
puts response.read_body{
"created": 1757165031,
"id": "task-unified-1757165031-uyujaw3d",
"model": "<string>",
"object": "audio.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 45
},
"type": "audio"
}{
"error": {
"message": "Bad request",
"type": "invalid_request_error"
}
}{
"error": {
"message": "API密钥无效",
"type": "authentication_error"
}
}{
"error": {
"message": "账户余额不足",
"type": "insufficient_quota"
}
}{
"error": {
"message": "Validation failed",
"type": "validation_error"
}
}{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"message": "Internal server error",
"type": "server_error"
}
}{
"error": {
"message": "服务暂不可用,请稍后重试",
"type": "service_unavailable"
}
}Speech Synthesis
ElevenLabs Voice Create
- Save the candidate explicitly chosen by the user. Creation is free.
- Submit an asynchronous task and query its status.
- On completion, results[0] contains the complete voice object, including voice_id for subsequent synthesis.
- Save voice_id yourself. The platform provides no voice listing, lookup or ID recovery. Task queries remain available but do not replace saving the ID.
POST
/
v1
/
audios
/
generations
ElevenLabs Voice Create
curl --request POST \
--url https://api.aihubmax.com/e/v1/audios/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "elevenlabs-voice-create",
"voice_name": "温暖中文旁白",
"voice_description": "自然、温暖、清晰的成年中文旁白声音,适合长篇讲解。",
"generated_voice_id": "selected-generated-voice-id",
"labels": {
"language": "zh"
}
}
'import requests
url = "https://api.aihubmax.com/e/v1/audios/generations"
payload = {
"model": "elevenlabs-voice-create",
"voice_name": "温暖中文旁白",
"voice_description": "自然、温暖、清晰的成年中文旁白声音,适合长篇讲解。",
"generated_voice_id": "selected-generated-voice-id",
"labels": { "language": "zh" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'elevenlabs-voice-create',
voice_name: '温暖中文旁白',
voice_description: '自然、温暖、清晰的成年中文旁白声音,适合长篇讲解。',
generated_voice_id: 'selected-generated-voice-id',
labels: {language: 'zh'}
})
};
fetch('https://api.aihubmax.com/e/v1/audios/generations', 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.aihubmax.com/e/v1/audios/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'elevenlabs-voice-create',
'voice_name' => '温暖中文旁白',
'voice_description' => '自然、温暖、清晰的成年中文旁白声音,适合长篇讲解。',
'generated_voice_id' => 'selected-generated-voice-id',
'labels' => [
'language' => 'zh'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.aihubmax.com/e/v1/audios/generations"
payload := strings.NewReader("{\n \"model\": \"elevenlabs-voice-create\",\n \"voice_name\": \"温暖中文旁白\",\n \"voice_description\": \"自然、温暖、清晰的成年中文旁白声音,适合长篇讲解。\",\n \"generated_voice_id\": \"selected-generated-voice-id\",\n \"labels\": {\n \"language\": \"zh\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.aihubmax.com/e/v1/audios/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"elevenlabs-voice-create\",\n \"voice_name\": \"温暖中文旁白\",\n \"voice_description\": \"自然、温暖、清晰的成年中文旁白声音,适合长篇讲解。\",\n \"generated_voice_id\": \"selected-generated-voice-id\",\n \"labels\": {\n \"language\": \"zh\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aihubmax.com/e/v1/audios/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"elevenlabs-voice-create\",\n \"voice_name\": \"温暖中文旁白\",\n \"voice_description\": \"自然、温暖、清晰的成年中文旁白声音,适合长篇讲解。\",\n \"generated_voice_id\": \"selected-generated-voice-id\",\n \"labels\": {\n \"language\": \"zh\"\n }\n}"
response = http.request(request)
puts response.read_body{
"created": 1757165031,
"id": "task-unified-1757165031-uyujaw3d",
"model": "<string>",
"object": "audio.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 45
},
"type": "audio"
}{
"error": {
"message": "Bad request",
"type": "invalid_request_error"
}
}{
"error": {
"message": "API密钥无效",
"type": "authentication_error"
}
}{
"error": {
"message": "账户余额不足",
"type": "insufficient_quota"
}
}{
"error": {
"message": "Validation failed",
"type": "validation_error"
}
}{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"message": "Internal server error",
"type": "server_error"
}
}{
"error": {
"message": "服务暂不可用,请稍后重试",
"type": "service_unavailable"
}
}elevenlabs-voice-create saves a chosen design candidate as a voice for speech synthesis. Creation is free. Voice Design and subsequent synthesis are billed separately under their respective models.
First call Voice Design, present all previews, and obtain the user’s explicit choice. Supply a nonempty voice_name, a voice_description of 20–1000 characters, and the chosen generated_voice_id. These three strings are trimmed before validation. Optional labels is an object with string keys and values.
Each candidate can be created only once and may expire. A generated_voice_id is not the saved synthesis ID. After submission, save the task ID and query the task until status=completed.
results[0] contains the complete voice object. Key fields include voice_id, name, description, labels, preview_url, category and settings, alongside actual sample, training, sharing, verification, permission and other metadata. Fields may be omitted or null; preview URLs are not synthesized. See special task results for the structure.
Save the generated
voice_id yourself. The platform provides no voice listing, voice lookup or ID recovery feature. Task queries remain available but do not replace keeping your own copy of the voice ID.voice_id with Custom Voice Speech or Custom Voice Dialogue. The voice must remain valid and accessible. Creation does not guarantee permanent availability, use across services or exclusive access. Voice editing, deletion and remix are not provided by this API.Authorizations
Body
application/json
Response
Task created