Prerequisites
- A Bland API key from your dashboard
curl, or any HTTP client
1. Generate a WAV file
hello.wav. That is the whole integration.
container: "wav" is what makes the result playable. The default, raw, returns bare
audio frames with no header. It is the right choice for streaming into a media transport,
and the wrong one for a file you want to double-click.2. Pick your own voice
The UUID above is Karen, one of the built-in voices. List everything available to you:id from that response as voice. See Choosing a voice for what
distinguishes them and how to clone your own.
3. Direct the delivery
Two controls shape the performance, both from0.0 to 1.0:
<|0.4|> inserts a pause. Writing for speech covers pauses,
numbers, punctuation, and the two controls in depth.
4. Choose the right endpoint for your app
You now have working audio. Which endpoint you ship depends on where the text comes from.
Anything conversational wants the WebSocket. A voice agent that waits for a complete LLM
response before starting synthesis adds the model’s entire generation time to every reply.
Realtime quickstart
Stream tokens into one session and get audio back as it renders.
Writing for speech
Pauses, numbers, punctuation, and the controls that shape delivery.
Streaming without the WebSocket
POST /v2/tts streams too. Drop container and read the response body as it arrives. This is
useful when the text is already complete but you want playback to start early:
BTTS_V3 renders natively.
Telephony
Phone networks want 8 kHz mu-law. Ask for it directly rather than converting afterwards:unsupported_sample_rate.
Docs for agents: llms.txt