Voices and voice cloning
Use presets, saved voice IDs, and reference audio safely.
Discover available voices
Every example on this page reads your key from the FEATHERLESS_API_KEY environment variable, so export it once before running any of them. The Python examples need pip install requests. The TypeScript examples use top-level await, so save each one with an .mjs extension, or set "type": "module" in package.json, and run it on Node 18 or newer, which supplies the built-in fetch they rely on.
curl --fail-with-body --get https://api.featherless.ai/v1/audio/voices \
--header "Authorization: Bearer $FEATHERLESS_API_KEY" \
--data-urlencode "model=hexgrad/Kokoro-82M"{
"model": "hexgrad/Kokoro-82M",
"voices": ["af_bella", "af_heart"],
"default_voice": "af_bella",
"formats": ["mp3", "wav"]
}The live response is authoritative. It can differ from the voice list published by the model authors, so use the discovery response rather than an outside list.
Preset voices
Pass one returned name directly as a string. Preset names are scoped to the selected model and should not be reused across models unless both discovery responses include them.
{
"model": "hexgrad/Kokoro-82M",
"input": "Use a preset voice.",
"voice": "af_bella"
}Custom voice IDs
Some models accept an opaque saved-voice ID. Pass one as { "id": "..." }. The current discovery endpoint does not advertise custom-ID support, so only use this form when the model guide for the selected model explicitly documents it.
One-shot voice cloning
{
"model": "SWivid/F5-TTS",
"input": "Synthesize this sentence with the reference voice.",
"voice": {
"clone": {
"audio": {
"data": "<bare base64 audio bytes>",
"format": "wav"
},
"reference_text": "The exact words spoken in the clip."
}
},
"response_format": "wav"
}reference_audio="$(base64 < reference.wav | tr -d '\n')"
curl --fail-with-body https://api.featherless.ai/v1/audio/speech \
--header "Authorization: Bearer $FEATHERLESS_API_KEY" \
--header "Content-Type: application/json" \
--data-binary @- \
--output speech.audio \
--write-out "Content-Type: %{content_type}\n" <<JSON
{
"model": "SWivid/F5-TTS",
"input": "Synthesize this sentence with the reference voice.",
"voice": {
"clone": {
"audio": {
"data": "$reference_audio",
"format": "wav"
},
"reference_text": "The exact words spoken in the clip."
}
},
"response_format": "wav"
}
JSONThe audio value must contain bare base64 data, not a data-URL prefix. The format describes the reference clip and can be mp3, opus, aac, flac, wav, or pcm at the schema level. Each model accepts only a subset of those; Featherless does not convert clone inputs.
Reference transcript
The transcript is optional in the schema, and not every model uses it. F5-TTS uses it; base Chatterbox and Chatterbox Turbo currently do not. Sending it to a model that does not use it is accepted and ignored, and is not guaranteed to affect the output. When supported, use the exact spoken words, including repeated words and disfluencies. Do not put target text in this field.
Reference recording quality
Use one speaker, a quiet room, consistent volume, little reverberation, and no music. Avoid clipped audio and long leading silence. Match the reference language and accent to the target when possible. Model guides specify duration recommendations because there is no universal ideal clip length.
Consent and temporary handling
Only clone a voice when you have the speaker’s informed permission and the right to use the recording. Featherless may temporarily stage the decoded clip behind a signed single-use URL while the request is in flight; an unused staged clip expires after approximately two minutes.
Current discovery limitation
The voices endpoint does not yet report whether cloning is required or optional, accepted clone formats, transcript requirements, or reference duration limits. Until the capabilities endpoint exposes those fields, treat each model guide as the public cloning contract.