Synthesize Speech (HTTP)
HTTP Speech
Synthesize Speech (HTTP)
Generate speech from a complete input string over HTTP.
POST
Synthesize Speech (HTTP)
Overview
Use this endpoint when the complete text is available before synthesis begins. It returns a streaming raw response or a complete WAV file in one HTTP request. For LLM tokens, multiple conversational turns, and interruption support, use Realtime Speech (WebSocket). It is the primary endpoint for realtime TTS.text and voice are the only required fields. You get 48 kHz PCM frames by default, ready to play or forward to a client. Set audio.container to wav for a file you can download and open.
Use a
BTTS_V3 voice. expressiveness and stability are calibrated for
it, and 48 kHz is the rate it renders natively. BTTS_V2 voices synthesize, but the
controls are not tuned for them. Read x-model to see which model a voice resolved to.Pricing
Text-to-speech is currently billed at $0.015 per 1,000 characters, the same rate on every plan. This is a limited-time launch offer, discounted from the standard $0.04 per 1,000 characters. Each request carries a minimum charge of $0.001, so very short generations bill at the minimum rather than the per-character rate. Some public-library voices carry an additional per-character creator fee. For a completed response, the charge comes back in thex-cost header. An interrupted raw stream can bill less because delivery accounting happens after that header is sent.
Billing follows delivery. A synthesis that fails before any bytes are written is not charged, and a fully delivered request is charged for the whole text. If a raw response is interrupted mid-stream, billing estimates the delivered characters at synthesized-chunk granularity. Individual audio bytes cannot be mapped to exact source characters.
Headers
string
required
Your API key.
Body Parameters
string
required
The text to speak. Maximum 5,000 characters.Insert a pause with
<|N|>, where N is a positive number of seconds: "Welcome to Bland. <|0.8|> How can I help?"string
required
Voice UUID. Names are not accepted. Get a UUID from List Voices.
object
Output format. All fields optional.
object
How the voice performs. Both are optional and range from
0.0 to 1.0.Response
Audio in the encoding and container you asked for.raw+pcm_s16le→Content-Type: audio/pcmraw+mulaw→Content-Type: audio/basicwav(any encoding) →Content-Type: audio/wav
string
Unique ID for this request. Include it in support tickets.
string
The model that produced the audio, for example
btts-3. Set by the voice you chose.string
The voice UUID used.
string
Output sample rate in Hz.
string
Full-response cost in USD. It matches the final charge when the response completes; an interrupted raw stream may have a lower delivery-based charge.
string
Milliseconds to the first audio byte. For
wav, the full render time.Errors
Every error returns the same shape, with a stable machine-readable code:Examples
Downloadable WAV file
cURL
Default (48 kHz PCM, raw)
cURL
Telephony (μ-law, 8 kHz)
cURL
Docs for agents: llms.txt