Text to speech
Turn text into natural speech - narration, voice agents, read-aloud - through the same gateway, key, and credit balance as chat. The request is the same as OpenAI's, so the OpenAI SDKs' audio.speech.create works unchanged.
POST/v1/audio/speech
Request
| Field | Type | Description |
|---|---|---|
| model* | string | A text-to-speech model id from the table below, e.g. elevenlabs/eleven-flash-v2.5. |
| input* | string | The text to speak, up to 20,000 characters. |
| voice | string | An ElevenLabs voice id from your voice library (see Voices). Omit it to get Sarah. |
| response_format | string | mp3 (default), opus, wav or pcm. |
| speed | number | Playback speed, 1 is normal. |
Example
bash
curl https://boldrouter.com/v1/audio/speech \
-H "Authorization: Bearer $BOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "elevenlabs/eleven-flash-v2.5", "input": "Hello from boldrouter."}' \
--output hello.mp3The response is the audio file itself. Errors come back as JSON, with a 400 when the voice or format isn't one the model supports.
Models & pricing
Billed per character of input. BYOK keys work here too.
| Model id | Per 1M characters |
|---|---|
elevenlabs/eleven-multilingual-v2 ElevenLabs' stable, high-quality multilingual TTS (29 languages) - the default voice model. | $100.00 |
elevenlabs/eleven-v3 ElevenLabs' most expressive TTS model (70+ languages) for the highest-quality speech. | $100.00 |
elevenlabs/eleven-flash-v2.5 ElevenLabs' fastest, lowest-cost TTS (~75ms, 32 languages) for real-time and high-volume use. | $50.00 |
elevenlabs/eleven-v3-conversational Low-latency conversational variant of Eleven v3 (70+ languages) for real-time agents. | $100.00 |
elevenlabs/eleven-flash-v2 English-only, low-latency ElevenLabs TTS. | $50.00 |
Voices
Every model takes any voice id from your ElevenLabs voice library - premade voices work on every ElevenLabs plan. The default is Sarah, a premade voice: EXAVITQu4vr4xnSDxMaL.
