Create voice (clone)
Creates a cloned ElevenLabs voice from one or more uploaded audio samples (Instant Voice Cloning). The returned voice_id is scoped to your workspace — only your workspace may use it in /v2/audio/speech. Submit as multipart/form-data.
POST
https://api.deutschlandgpt.de/v2/audio/voicesExample request
curl https://api.deutschlandgpt.de/v2/audio/voices \
-X POST \
-H "Authorization: Bearer $DGPT_API_KEY"curl https://api.deutschlandgpt.de/v2/audio/voices \
-X POST \
-H "Authorization: Bearer $DGPT_API_KEY"import os, requests
response = requests.post(
"https://api.deutschlandgpt.de/v2/audio/voices",
headers={"Authorization": f"Bearer {os.environ['DGPT_API_KEY']}"},
)
print(response.json())import os, requests
response = requests.post(
"https://api.deutschlandgpt.de/v2/audio/voices",
headers={"Authorization": f"Bearer {os.environ['DGPT_API_KEY']}"},
)
print(response.json())const response = await fetch('https://api.deutschlandgpt.de/v2/audio/voices', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.DGPT_API_KEY}`,
},
});
console.log(await response.json());const response = await fetch('https://api.deutschlandgpt.de/v2/audio/voices', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.DGPT_API_KEY}`,
},
});
console.log(await response.json());Response
200application/json
{
"id": "00000000-0000-0000-0000-000000000000",
"object": "voice",
"voice_id": "string",
"name": "string",
"requires_verification": true,
"created": 0
}{
"id": "00000000-0000-0000-0000-000000000000",
"object": "voice",
"voice_id": "string",
"name": "string",
"requires_verification": true,
"created": 0
}The created voice.
idstring<uuid>Registry id (pass to DELETE /v2/audio/voices/{id}).
objectstringvoice_idstringElevenLabs voice id — pass as voice to /v2/audio/speech.
namestringrequires_verificationbooleancreatedintegerResponse codes
200
The created voice.
object400
Missing name/file or provider error.
401
Unauthorized
503
ElevenLabs is not configured.
Was this page helpful?