voice_id: REST,
WebSocket and Speech-to-Speech. No reference audio is needed.
Have a recording instead?
Custom voices clone a speaker from a short audio sample.
How it works
1. Generate
Send a description, get candidate voices back in seconds.
2. Listen
Audition each candidate on a short line of Text-to-Speech.
3. Convert
Promote your pick to a permanent
voice_id.4. Use it
Text-to-Speech, streaming, and Speech-to-Speech all accept it.
Access
Base URLhttps://api.gradium.ai/api, API key in the x-api-key header.
Quickstart
The steps run as one sequence, carrying ids in shell variables or Python names.1
Generate candidates
201 Created
ready: false.Every request mints new ids. Store them. To recover ids you did not store,
list your candidates with
GET /voice-generator/embeddings.2
Wait for them to be ready
200 OK
200 with an empty embeddings list, not 404, so
check the list before indexing into it. Timestamps are UTC with or without a
trailing Z.3
Listen to a candidate
Pass the candidate id as The response body is the audio, 48 kHz mono. Repeat for the other candidates.Candidates have three restrictions that converted voices do not:
voice_id on the normal Text-to-Speech endpoint. The
vox_emb_ prefix is how the API tells a candidate from a converted voice.- Text is capped at 100 characters (
400 input text too long). - REST only. The TTS WebSocket and Speech-to-Speech reject candidate ids with error
1011. - A candidate that is not ready, unknown, or from another account returns
404 Embedding not found.
4
Convert the candidate into a voice
A candidate is a draft, deleted 30 days after generation. Converting it
creates a permanent voice in your library.
201 Created
uid is your permanent voice_id. Store this one. It is the same value as
voxium_embedding_id in the request and voice_id everywhere else.- Converting is free. The voice uses one custom-voice slot, shared with voice clones. Over the allowance:
409 Custom voice limit reached. - It clears the candidate’s expiry.
- Converting the same candidate twice:
409 A voice was already created from this embedding: <voice_id>. Store the candidate-to-voice mapping yourself rather than parsing this. - Not ready or unknown:
409 Embedding is not ready yet.
5
Use the voice
voice_id works with the
Python SDK, the
TTS WebSocket and
Speech-to-Speech.6
Clean up
Candidates you do not convert are removed after 30 days. To remove one sooner:Safe at any time: a converted voice holds its own copy. An id that is already
gone returns
cURL
404.Complete example
The whole flow in one file. SetGRADIUM_API_KEY and run it. It creates a
real voice in your account.
Audio is streamed, so WAV headers carry placeholder lengths. Readers that trust the header, such as Python’s
wave, report a wrong duration. Rewrite the RIFF and data sizes after saving if that matters to you.Writing a description
The description is the only input the model has. It was trained on descriptions with five parts in a fixed order, and Voice Design tidies what you send into that shape before it generates. The tidying fixes the order, but it cannot add a part you left out, and it keeps vague words as they are. A part you leave out is decided at random, and it can change from one candidate to the next.
One short sentence per part, in that order:
Feminine, middle-aged. Tour guide. Scottish accent. Enthusiastic, amused. A bright, clear voice with a lively pace.In Studio, the Prompting tips button next to the description opens the same guidance beside the field.


Rules of thumb
- Keep it short. One short sentence per part, in common words. Most good descriptions are under 200 characters; the 500 character limit is a ceiling, not a target.
- Give age as a group, not a number. “Middle-aged” works; “47” or “40 to 55” does not help.
- Name one accent, in its own sentence. A regional accent works as well as a broad one: “Scottish”, “Bristolian” or “Texan”. Set
languageto the language the voice will speak; the accent still goes in the description. - Pitch is reliable, texture is a nudge. “Low” and “high” mean the same thing to everyone, model included. “Breathy” or “raspy” move the voice less reliably; pair them with a pitch word.
- Describe the voice, not the script or the scene. Words to be spoken go in the audition line. Plot, setting, exact numbers and film references do not help.
- For a character, push further. “Very high”, “very low”, two or three texture words stacked, a stronger mood word.
Examples
A role on its own leaves the rest to chance. Three candidates for “A tour guide.” ranged from about 110 Hz to 260 Hz: the model did not even settle on a gender. Filling in the other parts fixes that.Let the script do the acting
Pace, pauses and punch come mostly from the text the voice reads, not from the description. With the same voice, “Everybody out, now!” and “Everybody out. Now!” sound different: the full stop gives the shout its own beat. Splitting a long sentence in two adds a pause and slows the start.Iterating
Change the part that is off rather than rewriting the description.Building this into a product
If you expose voice design to your own users, prefill a form over the five parts and compose the sentence from it in order, with a free-text box as the escape hatch. Show the 500 character limit. Offer “keep this one” as the way to hold onto a voice, and make regenerate send a new description rather than more samples.Generation settings
Generation settings shape the voice and go injson_config on
POST /voice-generator/generate. Synthesis settings
shape each utterance and go in json_config on the TTS request. Voice Design
still supports cfg_scale to control how literally the voice follows your
description.
All generation settings are optional. The defaults are tuned, so send only the
keys you have a reason to change.
cfg_scale
5.0, the default, when exploring with 3 to 5 candidates and you want them to differ.8.0to12.0when candidates drift from the description, or when generating one candidate at a time. Conversational designers that generate one candidate per turn typically use10.0.- Above
12.0the voice follows the description ever more literally at the cost of naturalness, and candidates converge on each other.
cfg_scale cannot add a part the description does not name. Fix the
description first.
The json_config allow-list
Synthesis settings
Auditioning a candidate or synthesising with a converted voice is an ordinary TTS request, so everything in Voice Settings applies. See Model selection for TTS model access.Temperature (temp)
0.0 to 1.4, default 0.7.
- Audition at the default.
0.0makes a lively voice sound flatter than it will in production. 0.3to0.5for scripted, high-volume output where takes must match: IVR prompts, fixed announcements.- Default or slightly above for conversational agents and narration.
Supported tags
The models read plain text. Two inline tags are recognised, on candidates and converted voices alike. Anything else is spoken aloud as text.
On a candidate, tags count toward the 100-character limit.
Not supported
SSML is not interpreted.<speak><prosody rate="slow">Hello there.</prosody></speak>
produces a voice saying “speak prosody rate slow, hello there, slash prosody,
slash speak”. Use these instead:
Markdown and HTML are read as text too. Strip formatting before sending.
Candidate lifecycle
Limits
Errors
Errors are{"detail": "..."}, except 422, which carries a list of field errors.
A candidate that never becomes ready is almost always a
json_config value out
of range or a key the API does not recognise. See the
allow-list.
Next steps
Voice Localization
Make a candidate or converted voice speak another language or accent.
Manage Voices
List, update, and delete the voices you convert.
Voice Settings
Speed, temperature and other synthesis options.
Streaming Text-to-Speech
Use your new voice on the low-latency WebSocket.
API Reference
The Voice Design endpoints in full.