Create a custom voice (clone)
curl --request POST \
--url https://api.opper.ai/v3/audio/voices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"audio": "<string>",
"model": "<string>"
}
'import requests
url = "https://api.opper.ai/v3/audio/voices"
payload = {
"audio": "<string>",
"model": "<string>"
}
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({audio: '<string>', model: '<string>'})
};
fetch('https://api.opper.ai/v3/audio/voices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created": 123,
"id": "<string>",
"object": "<string>",
"provider": "<string>",
"expires_at": 123,
"languages": [
"<string>"
],
"name": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}Audio
Create Voice
Clone a custom voice from a short reference sample (a few seconds of speech). model selects the provider to clone on (e.g. mistral/voxtral-mini-tts-2603) — the returned voice works with any of that provider’s TTS models; audio is the reference sample as a file_<id>, an https URL, or a base64 data-URI; languages and gender are optional hints. Returns an opaque id (voice_…) to pass as voice on POST /v3/audio/speech. The voice is scoped to your project — it is not visible to or usable by other projects — and the reference audio is not stored. Paid feature.
POST
/
v3
/
audio
/
voices
Create a custom voice (clone)
curl --request POST \
--url https://api.opper.ai/v3/audio/voices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"audio": "<string>",
"model": "<string>"
}
'import requests
url = "https://api.opper.ai/v3/audio/voices"
payload = {
"audio": "<string>",
"model": "<string>"
}
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({audio: '<string>', model: '<string>'})
};
fetch('https://api.opper.ai/v3/audio/voices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created": 123,
"id": "<string>",
"object": "<string>",
"provider": "<string>",
"expires_at": 123,
"languages": [
"<string>"
],
"name": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}Authorizations
API key authentication. Pass your API key as a Bearer token.
Body
application/json