If your app already sends text to ElevenLabs and writes the returned audio to a file or stream, the migration is intentionally small: change the endpoint to Gradium, send your Gradium API key asDocumentation Index
Fetch the complete documentation index at: https://docs.gradium.ai/llms.txt
Use this file to discover all available pages before exploring further.
x-api-key, and
use a Gradium voice_id.
Endpoint swap
| Flow | ElevenLabs | Gradium |
|---|---|---|
| One-shot TTS | POST https://api.elevenlabs.io/v1/text-to-speech/{voice_id} | POST https://api.gradium.ai/api/post/speech/tts |
| Streaming TTS | wss://api.elevenlabs.io/v1/text-to-speech/{voice_id}/stream-input | wss://api.gradium.ai/api/speech/tts |
Request mapping
For POST requests, the most important change is that Gradium takes the voice in the JSON body instead of the URL path:| ElevenLabs concept | Gradium field |
|---|---|
{voice_id} path parameter | voice_id |
text | text |
model_id | model_name |
| Output format query/body settings | output_format |
xi-api-key header | x-api-key header |
only_audio is true, so existing “save the response body as audio”
code can stay the same.
WebSocket mapping
ElevenLabs streaming clients usually connect, send an initial settings message, then send text. In Gradium, that same lifecycle becomes:- Connect to
wss://api.gradium.ai/api/speech/tts. - Send a
setupmessage withvoice_id,model_name, andoutput_format. - Send one or more
textmessages. - Send
end_of_stream. - Read
audiomessages until Gradium sendsend_of_stream.
Checklist
- Replace the ElevenLabs URL with the Gradium endpoint.
- Change auth from
xi-api-keytox-api-key. - Move the voice id from the URL path into
voice_id. - Use a Gradium voice id from the voice library.
- Keep your existing audio write/playback path.
Gradium TTS REST guide
Full POST schema, response modes, and supported output formats.