API reference
Base URL https://api.breadtts.com/v1 · JSON in, audio out · $5 per million input characters · speech-to-text from $0.05 per hour (jump).
Quickstart
- Create an account — you get 250,000 free characters.
- Create a key on the API keys page.
- Make a request:
curl "{API}/audio/speech" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "{MODEL}", "voice": "alba", "input": "Hello! Your order ships today."}' \
--output hello.mp3
Authentication
Send your key as a bearer token: Authorization: Bearer sk_live_.... X-API-Key is also accepted. Keys are secret; call the API from your server, never from a browser or mobile app.
sk_test_ keys return real audio for free, limited to 100 characters per request and 100 requests per day.
Using the OpenAI SDKs
The speech endpoint is wire-compatible with OpenAI's. Point the SDK's base URL at us; tts-1, tts-1-hd and gpt-4o-mini-tts are accepted as model names, and OpenAI voice names (alloy, nova, onyx, ...) map to similar stock voices. instructions is accepted and ignored (reported in X-Ignored-Parameters).
from openai import OpenAI
client = OpenAI(base_url="{API}", api_key="sk_live_...")
client.audio.speech.create(model="{MODEL}", voice="alba", input="Hi!").write_to_file("hi.mp3")
Create speech
POST/v1/audio/speech
| Parameter | Type | Default | Description |
|---|---|---|---|
input | string | string[] | required | Text to speak. Up to 10,000 characters (20,000 with stream). Pass an array to keep your own chunk boundaries (e.g. sentences from an LLM). |
voice | string | alba | Stock voice id, your clone id (cloned_...) or an OpenAI voice name. |
model | string | {MODEL} | {MODEL}, bread-premium-2 for premium voices, or bread-expressive-1 for expressive voices with inline tags. OpenAI model names are accepted as aliases of {MODEL}. |
response_format | string | mp3 | mp3, opus (Ogg), aac, flac, wav, pcm (24 kHz, 16-bit, mono, little-endian), ulaw / alaw (raw G.711, 8 kHz mono, for telephony). |
sample_rate | integer | 24000 | pcm and wav only: 8000, 16000, 22050, 24000, 44100 or 48000. ulaw/alaw are always 8000. |
speed | number | 1.0 | 0.5 to 2.0. Pitch is preserved. |
normalize | boolean | true | Turn text into speakable words (see normalization). Disable if you pre-process text yourself. |
pronunciations | array | - | Up to 100 {"word","respelling"} overrides, applied before the built-in dictionary. |
stream | boolean | false | Stream audio as it is generated. mp3, opus, aac, pcm, ulaw, alaw. stream_format: "audio" is an alias. |
delivery | string | bytes | bytes: audio body. url: JSON with a download link valid for 24 hours. json: base64 audio plus usage. |
include_cost | boolean | false | Adds X-Cost-USD and X-Balance-USD headers. JSON deliveries always include a usage object. |
return_normalized_text | boolean | false | Echo the exact text spoken, per chunk (json/url delivery). |
timestamps | boolean | false | Add sentence and word timings for captions and highlighting (json/url delivery; see timestamps). |
instructions | string | - | Accepted for OpenAI compatibility and ignored (listed in X-Ignored-Parameters). Pick the delivery with the voice, or use expressive tags. |
seed | integer | random | Repeatable output for the same input and settings. |
chunk_silence_ms | integer | 80 | Pause inserted between chunks, 0-2000. On bread-premium-2 it is inserted between every sentence. |
Every response carries X-Request-Id, X-Model, X-Billable-Characters, X-Cold-Start (1 if an instance started or woke for this request) and X-Voice-Id; non-streamed responses also include X-Audio-Duration-Ms.
Streaming
With "stream": true the first bytes arrive after the first sentence is synthesized, so playback can start long before the full clip is ready. Use pcm for the lowest latency in voice agents (play samples directly), or mp3 for broad player support.
curl -N "{API}/audio/speech" -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \
-d '{"input": "A long story...", "voice": "george", "response_format": "pcm", "stream": true}' \
| ffplay -f s16le -ar 24000 -ac 1 -nodisp -autoexit -
Resuming a dropped stream
Streamed responses carry X-Resume-Token, valid for 10 minutes. If your connection drops, send the same request body again with resume_token and resume_offset (the number of audio bytes you already received). The stream continues from that byte, and the resume is not billed again. Each stream can be resumed up to 5 times.
{ "input": "A long story...", "voice": "george", "response_format": "pcm", "stream": true,
"resume_token": "tr_...", "resume_offset": 183040 }
The audio is regenerated with the stream's seed (X-Seed), so nothing is stored, with or without zero data retention. A token only works for the same account and the same request body. Otherwise you get invalid_resume_token.
Delivery options
Audio is never stored by default. With "delivery": "url" we keep the file for 24 hours and return:
{
"object": "audio.speech",
"id": "req_...",
"voice": "alba",
"format": "mp3",
"duration_ms": 5120,
"audio": { "url": "{API}/files/aud_...mp3?exp=...&sig=...", "expires_at": 1791763200, "bytes": 41210 },
"usage": { "billable_characters": 84, "normalized_characters": 97, "cost_usd": 0.00042, "balance_usd": 12.34558 }
}
Anyone with the link can download the file until it expires, so treat links like secrets. Not available with zero data retention.
Timestamps
With "timestamps": true (delivery json or url) the response adds sentence and word timings of the spoken text, for captions and word highlighting:
"timestamps": {
"estimated": true,
"source": "normalized_text",
"sentences": [{ "text": "Your order ships today.", "start_ms": 0, "end_ms": 1480 }],
"words": [{ "word": "Your", "start_ms": 0, "end_ms": 210 }, { "word": "order", "start_ms": 210, "end_ms": 560 }, ...]
}
Times are estimated from the text and scaled to the real audio duration, usually within a few hundred milliseconds per word. Words are those of the normalized text ($5 becomes five dollars). Timestamps are free.
Telephony
Phone networks use 8 kHz G.711. Request "response_format": "ulaw" (North America, Japan, Twilio Media Streams) or "alaw" (Europe) and send the bytes as they are, streamed or not: no conversion on your side. For transcription, open the realtime stream with encoding=mulaw&sample_rate=8000 (or alaw) and pass the caller's audio straight through. pcm and wav take any sample_rate from the list above, e.g. 16000 for wideband VoIP.
Text normalization
On by default. Numbers, currency ($1,299.99), dates (3/14), times (9:30pm), ordinals, temperatures, phone-style digit runs, acronyms, Roman numerals, markdown, URLs and emoji are converted into words the voice reads naturally. Preview the result for free:
POST/v1/normalize
{ "input": "Dr. Smith paid $42.50 on 3/14.", "pronunciations": [{ "word": "Smith", "respelling": "Smyth" }] }
-> { "normalized": "Doctor Smyth paid forty two dollars and fifty cents on March fourteenth.", "billable_characters": 30, "estimated_cost_usd": 0.00015 }
List voices
GET/v1/voices GET/v1/voices/{id}
Returns your clones first, then the stock catalogue. Filter with ?type=clone or ?type=stock. Every stock voice has a preview_url you can play without authentication.
Voice cloning
POST/v1/voices PATCH/v1/voices/{id} DELETE/v1/voices/{id}
Accept the cloning terms once in the dashboard, then upload 3-60 seconds of clean speech (10-20 s is ideal). Accepted formats: wav, mp3, m4a/aac, ogg/opus, webm, flac, up to 12 MB. Up to 20 voices per account; creating them is free and they cost the same to use as stock voices.
curl "{API}/voices" -H "Authorization: Bearer $API_KEY" \
-F name="Sam narrator" -F [email protected] -F consent=true
-> { "id": "cloned_3f9c...", "object": "voice", "name": "Sam narrator", "type": "clone", "models": ["bread-1", "bread-premium-2", "bread-expressive-1"], "premium": true, ... }
consent=true is your attestation, for this specific recording, that it is your voice or that you have the speaker's documented permission. One upload makes the clone for both models: bread-1 always, and bread-premium-2 while premium is available ("premium": true, which also makes the clone work on bread-expressive-1; if the premium profile could not be built, the clone still works on bread-1 and premium_error says why). Your upload is processed and discarded; we keep only encrypted voice profiles. Deleting the voice deletes them.
Premium voice (bread-premium-2)
Set "model": "bread-premium-2" on POST /v1/audio/speech for lifelike premium voices generated on GPUs, at $10 per million characters (per character, no minimum). Same parameters, formats and streaming as bread-1, with these differences:
- Voices: every stock voice and your premium-ready clones (
GET /v1/voicesmarks both"premium": trueand listsbread-premium-2inmodels;GET /v1/voices?model=bread-premium-2lists only these). Defaultemily. OpenAI voice names map to premium voices. Clones without a premium profile are bread-1 only; add one with a premium sample. - Parentheses are pauses: other text in parentheses is read aloud as an aside with a short pause, never as an instruction, so
(approx. 2 kg)is spoken normally. - No
seedand no stream resume: output is not repeatable, so a dropped stream is retried from the start of the request. X-Premium-Pathreports which pool served the request (diagnostic only).
Prewarm (free). Premium runs on an always-on GPU pool; under heavy load extra GPUs start on demand and sleep after about 10 idle seconds. Send a prewarm the moment you know a reply is coming, e.g. when your user stops talking, so capacity is ready and the first sentence starts fast:
curl -X POST "{API}/warmup?model=bread-premium-2" -H "Authorization: Bearer $API_KEY"
-> { "object": "warmup", "model": "bread-premium-2", "status": "warming" }
Prewarms are deduplicated and never billed, so calling one per conversation turn is fine. In a full-duplex agent built on the realtime stream, add tts_prewarm=bread-premium-2 to the stream URL and the API sends the prewarm for you at every speech_ended.
Expressive voice (bread-expressive-1)
Set "model": "bread-expressive-1" for the premium voices with performed non-verbal sounds and delivery styles, generated on GPUs at $8 per million characters (per input character like the other models, no minimum). Write tags in square brackets inside input and the voice performs them instead of reading them:
curl "{API}/audio/speech" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "bread-expressive-1", "voice": "emily", "input": "That'\''s hilarious [laugh] okay, let me check."}' \
--output expressive.mp3
- Voices: the same voices as bread-premium-2: premium stock voices and your premium-ready clones (
"premium": trueinGET /v1/voices; such clones listbread-expressive-1inmodels). Defaultemily. - English only: non-English input returns
400with codelanguage_not_supported. Use bread-premium-2 for other languages. - Unknown tags are removed, never read aloud. bread-1 and bread-premium-2 silently remove these tags too, so the same text is safe on every model.
- No
seedand no stream resume, as on bread-premium-2. - Prewarm (free):
POST /v1/warmup?model=bread-expressive-1, ortts_prewarm=bread-expressive-1on the realtime stream URL.
| Kind | Tags | Also accepted |
|---|---|---|
| Sounds | [laughing] [laughs] [laughter] [chuckles] [sighs] [gasps] [coughs] [clears throat] [sniffs] [groans] [shh] | |
| Delivery | [whisper] [whispers] |
Use tags sparingly, where a person would actually laugh or sigh; a tag on every sentence sounds forced. Try them in the playground, which has one-click tag chips.
Voice design and clone + adjust
POST/v1/voices/design then POST/v1/voices with JSON {name, preview_id}
Describe a voice in words and get up to three previews on bread-premium-2; save the one you like as a clone (it works on bread-1 and bread-premium-2 and counts toward your 20 voices). Send a reference file (multipart, with consent=true) to clone + adjust: the previews keep that speaker and the description changes the delivery (emotion, pace, energy), not the identity. The Voice Design Studio in the dashboard does the same with clickable traits (how to use it).
| Field | Type | Default | Description |
|---|---|---|---|
description | string | - | Up to 300 characters: gender, age, pitch, texture, emotion, pace, accent. Required unless a file is sent. Descriptions that name or imitate a real person are rejected (description_not_allowed). |
preview_text | string | per language | Up to 200 characters spoken in each preview. Defaults exist for en, es, fr, de, it, pt, nl, ja, zh and ko; send your own for other languages. |
language | string | en | Picks the default preview_text. |
count | integer | 3 | Previews to generate, 1-3. Each uses a different seed. |
file, consent | multipart | - | Optional reference recording (same formats and rules as cloning). |
curl "{API}/voices/design" -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \
-d '{"description": "A warm, middle-aged woman with a low voice, calm and reassuring", "count": 3}'
-> { "object": "voice_design", "source": "design", "previews": [ { "id": "pv_9b1e...", "url": "https://.../v1/files/aud_...mp3?...", "expires_at": 1793450000, "chars": 166 }, ... ],
"usage": { "model": "bread-premium-2", "billed_characters": 498, "cost_usd": 0.00498, ... } }
curl "{API}/voices" -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \
-d '{"name": "Calm narrator", "preview_id": "pv_9b1e..."}'
Billing and limits: previews are billed at the premium rate per character (preview_text length x previews generated; failed previews are refunded). Saving is free. Preview links expire after 15 minutes and preview ids after 24 hours. Up to 30 preview batches per hour and 2 at a time per account (429). Test keys cannot design voices.
Using the Voice Design Studio
No code needed: the studio is on the Voices page of the dashboard.
- Pick a mode. Describe a voice creates a new voice from words. Clone + adjust starts from a recording (5-60 s, one speaker, with the speaker's permission) and changes how it is delivered.
- Describe the voice. Type up to 300 characters or click the trait chips (gender, age, pitch, texture, emotion, pace, accent). The examples under the box are a good starting point.
- Choose the preview. Pick a language (the default sentence follows it) and 1-3 previews. You can edit the preview sentence; the estimated cost is shown before you generate.
- Generate and listen. Each preview is a different take on the same description. Click Generate again for new takes, or tweak the description first.
- Save your favorite. Click Use this voice on it and give it a name. It appears under Your voices with a
cloned_...id that works on bread-1 and bread-premium-2, in the playground and in every API request.
Clone + adjust uses the same cloning terms as cloning; accept them once on the Voices page first.
Writing a good description. Describe how the voice sounds, from broad to specific: "A young man with a bright, slightly raspy voice, energetic and friendly, speaking quickly with an Australian accent." Combine a few traits rather than many; one emotion and one pace work better than several. Use preview_text that sounds like your real content (a support greeting, a story opening) to judge the voice in context. Names of real people, celebrities or "sounds like" comparisons are rejected.
Languages
bread-premium-2 speaks 30 languages; there is no language parameter, it reads the language of your text (a voice keeps its identity across languages). bread-1 and bread-expressive-1 are English only (bread-expressive-1 returns language_not_supported for other languages).
Arabic, Burmese, Chinese (Mandarin, plus dialects such as Cantonese and Sichuanese), Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Indonesian, Italian, Japanese, Khmer, Korean, Lao, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Tagalog, Thai, Turkish, Vietnamese.
GET /v1/models lists the ISO 639-1 codes in each model's languages. Text normalization (numbers, abbreviations) is English-oriented; for other languages write numbers as words for the most natural reading.
Speech to text: realtime stream
GET/v1/audio/transcriptions/stream WebSocket · model {STT_MODEL} · $0.06 per hour of audio, billed per connected second
Open a WebSocket with your key in the Authorization header and stream raw audio as binary frames (mono, 20-100 ms per frame). Settings go in the query string. Partial text arrives while the person speaks; a final event commits each sentence, and speech_ended marks the end of a turn, so a voice agent knows when to reply.
import asyncio, json, os, websockets
URL = "{WSS}?sample_rate=16000"
async def main():
headers = {"Authorization": f"Bearer {os.environ['API_KEY']}"}
async with websockets.connect(URL, additional_headers=headers) as ws:
async def send_audio():
with open("call.raw", "rb") as f: # 16 kHz, 16-bit, mono PCM
while chunk := f.read(3200): # 100 ms per frame
await ws.send(chunk)
await asyncio.sleep(0.1)
await ws.send(json.dumps({"type": "finalize"}))
asyncio.create_task(send_audio())
async for message in ws:
event = json.loads(message)
if event["type"] == "partial":
print("...", event["text"], end="\r")
elif event["type"] == "final":
print(event["text"])
asyncio.run(main())
Audio sent before the engine is ready is buffered (up to 6 MB, about 3 minutes at 16 kHz), so you can start streaming right away. Engines resume from standby in about a second; use a session to have one ready before the user speaks. Connections last up to 2 hours (60 seconds with sk_test_ keys). Reconnect to continue.
Dropped connections
Every ready event carries a resume_token, which lasts 5 minutes. A resume_token event sends a fresh one before it expires. To survive a network drop, or an engine_unavailable error (close code 4503):
- Keep each audio frame you send until a
finalevent covers it, which means itsend_msis at or after the end of that frame. Between turns, a couple of seconds is enough. - When the connection drops, reconnect to
{WSS}?resume_token=...with the same settings. The token is the credential, so you don't need a key or a new browser token. The resumed connection keeps the session id and has no second 10-second minimum. - Send the frames you kept, then continue with live audio. The session clock carries on:
readyhasresumed: trueandmic_position(16 kHz samples heard so far), and the replayed audio is timed frommic_position / 16ms onward. The turn that was open when the connection dropped is discarded, so replaying it loses nothing.
Stream settings
Pass any of these as query parameters. Most can also be changed mid-stream with a config message.
| Parameter | Default | Description |
|---|---|---|
encoding | pcm_s16le | pcm_s16le, pcm_f32le, mulaw, alaw (telephony), or opus: one raw Opus packet per binary frame, no Ogg container. |
sample_rate | 16000 | 8000-48000 Hz. Ignored for opus. 16 kHz is ideal; other rates are resampled. |
silence_commit_ms | 700 | 200-5000. Pause that ends a turn (speech_ended). |
end_of_turn | smart | smart: if the text so far ends on a filler or connecting word ("um", "so", "and", "then", "the", "to"... as in "I want to order a..."), wait incomplete_commit_ms instead. silence: always commit after silence_commit_ms. |
incomplete_commit_ms | 1600 | 200-5000. Pause that ends an unfinished-sounding turn in smart mode. |
final_ms | 150 | 100-1000, at most silence_commit_ms. Silence after which the sentence is finalized (before the turn ends). |
preset | normal | quiet, normal or noisy. Sets the speech detector's sensitivity unless you set vad_threshold/min_speech_ms. |
vad_threshold | 0.5 | 0.1-0.95. Higher ignores more background sound. |
min_speech_ms | 96 | 32-1000. Speech needed before speech_started. |
noise_gate_dbfs | off | off, auto (tracks the noise floor), or a level from -80 to -20 dBFS below which audio counts as silence. |
noise_suppression | false | Server noise suppression. Helps steady noise (fans, hum); can hurt with background talkers. |
agc | false | Automatic gain control for very quiet microphones. |
aec | auto | Echo cancellation when you send reference audio. off disables it. |
barge_in_threshold / barge_in_min_ms | 0.5 / 128 | Speech detection while reference audio is playing (an interruption). Raise them if echo is taken as an interruption. |
interim_results | true | Send partial events. |
punctuate | true | Punctuation and capitalization. |
word_timestamps | true | Add words[] with per-word start_ms/end_ms to text events. |
speculative | false | Send speculative_final as soon as a turn probably ended, so you can start your LLM early; speculative_cancel follows if the person keeps talking. |
vocabulary | - | Up to 100 terms for this connection, comma-separated (or a JSON array in a config message). See vocabulary. |
output | json | text sends each final as a plain text line instead of JSON. Other events stay JSON. |
max_segment_ms | 15000 | 2000-60000. Force a final during long uninterrupted speech. |
idle_timeout_s | 300 | 10-1800. Close the connection after this long without speech. |
language | auto | auto transcribes any supported language. en removes words that are not English (for example, words in other languages heard in background noise). prefer_en does the same, but keeps other languages when they are spoken clearly into the microphone. |
session_id | - | Use a held session. |
Events
The server sends JSON text frames. Every event has type, seq and session_ms; turn events carry a turn_id; text events add text, start_ms, end_ms and (with word_timestamps) words.
| type | Meaning |
|---|---|
session | Sent at once: session_id, request_id, status (ready or starting). |
ready | The engine is listening and billing starts. Includes the effective config, cold_start, waited_ms, resume_token (see dropped connections), and resumed/mic_position after a reconnect. |
resume_token | A fresh resume_token, sent before the previous one expires. |
speech_started | The person started talking (use it to stop your TTS playback). |
partial | Text so far for the current sentence. Replaces the previous partial. |
final | A finished sentence. Append it; it won't change. |
speech_ended | The turn is over. Time to respond. |
finalized | Answer to {"type": "finalize", "ack": true}: every final for the audio sent before it has been delivered. |
speculative_final / speculative_cancel | Only with speculative=true. |
closing | The server is about to close: reason is max_duration, test_key_limit, insufficient_balance, monthly_cap_reached or idle_timeout. |
error | code and message. Setting errors (bad_config, bad_audio, bad_message) keep the connection open. |
{"type": "final", "seq": 14, "session_ms": 5230, "turn_id": 2, "text": "Can I move my appointment to Friday?",
"start_ms": 3120, "end_ms": 5080, "words": [{"word": "Can", "start_ms": 3120, "end_ms": 3280}, ...]}
Client messages
Besides binary audio, you can send JSON text frames:
{"type": "config", ...settings}: change settings mid-stream (notencoding/sample_rate).{"type": "finalize"}: commit everything heard so far now, without waiting for a pause. Send it before closing; with"ack": truethe server answersfinalizedonce the last final is out, so you know when it is safe to close.{"type": "reset"}: drop the current turn.{"type": "keepalive"}: keep an idle connection open.{"type": "ping", "t": any}: answered with{"type": "pong", "t": ...}after all earlier audio is processed.reference_audioandplayback: see echo & barge-in.
Sessions & warm engines
POST/v1/sessions GET/v1/sessions/{id} DELETE/v1/sessions/{id}
A session prewarms an engine for one of your users, so their stream starts instantly. Create it when a call or screen opens, then connect with ?session_id=. Holding a session is free; it ends after 5 minutes with no speech, or when you delete it.
curl "{API}/sessions" -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" -d '{"type": "stt", "wait_s": 20}'
-> { "object": "session", "id": "sess_...", "type": "stt", "ready": true,
"stt": { "ready": true, "cold_start": true, "idle_timeout_s": 300, ... }, "stream_url": "{WSS}?session_id=sess_..." }
type is stt, tts or duplex (both, for voice agents). One stream at a time per session (session_busy otherwise). If a connection drops, reconnect with the same session_id within 5 minutes: ready reports "resumed": true and echo cancellation keeps its state. POST /v1/warmup?product=stt starts a shared instance without reserving it.
Browser tokens
POST/v1/realtime/token
Never put a key in a browser or app. Have your server mint a single-use token (valid 60 seconds; optionally pass {"session_id": "sess_..."}), then connect from the browser with the token as a WebSocket subprotocol, or as ?token=:
// server: POST {API}/realtime/token -> { "object": "realtime_token", "token": "rt_...", "expires_at": ..., "url": "..." }
const ws = new WebSocket("{WSS}?sample_rate=16000", ["bread-stt", token]);
ws.binaryType = "arraybuffer";
ws.onmessage = (e) => { const ev = JSON.parse(e.data); if (ev.type === "final") console.log(ev.text); };
Echo cancellation & barge-in
For voice agents on a speaker, send what you play as reference audio and the server removes it from the microphone, so you don't need echo cancellation on the device and the user can interrupt (barge in) at any time.
- Send
{"type": "reference_audio", "encoding": "pcm_s16le", "sample_rate": 24000}. From then on, prefix every binary frame:0x01+ microphone audio, or0x02+ the audio you are playing. - Send reference frames when you play them, interleaved with the microphone frames. With
"timestamps": true, a reference frame is0x02+ an int64 little-endian microphone sample position + audio, for exact alignment. - On
speech_startedstop playback and send{"type": "playback", "state": "stop"}. Optionally send{"type": "playback", "text": "..."}with the spoken text so leftover echo is never transcribed.
Vocabulary
GET/v1/stt/vocabulary PUT/v1/stt/vocabulary
Teach the recognizer names, products and jargon. Your account vocabulary (up to 500 terms) applies to every stream and file; add up to 100 more per request with vocabulary. sounds_like lists how the term tends to be misheard. PUT replaces the whole list; an empty list clears it. You can also edit it on the playground.
curl -X PUT "{API}/stt/vocabulary" -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \
-d '{"terms": ["Kubernetes", {"term": "Nguyen", "sounds_like": ["win", "new yen"]}]}'
File transcription
POST/v1/audio/transcriptions $0.05 per hour of audio
OpenAI-compatible. Upload wav, mp3, m4a, ogg/opus, flac or webm, up to 100 MB and 2 hours, as multipart/form-data with a file field, or as a raw audio body with the options in the query string. whisper-1 and gpt-4o-transcribe are accepted as model names, so the OpenAI SDK works with our base URL.
curl "{API}/audio/transcriptions" -H "Authorization: Bearer $API_KEY" \
-F [email protected] -F response_format=verbose_json -F "timestamp_granularities[]=word"
from openai import OpenAI
client = OpenAI(base_url="{API}", api_key="sk_live_...")
print(client.audio.transcriptions.create(model="whisper-1", file=open("meeting.mp3", "rb")).text)
| Field | Default | Description |
|---|---|---|
file | required | The audio file (multipart), or send the audio as the request body. |
response_format | json | json ({"text"}), verbose_json (adds duration and segments), text, srt or vtt. |
timestamp_granularities[] | segment | Add word for words[] with start/end seconds (verbose_json). |
vocabulary | - | Up to 100 extra terms, comma-separated or a JSON array. |
model, language, prompt, temperature | - | Accepted for compatibility. Only English is supported for now. |
The response includes X-Audio-Duration-Ms, X-Cost-USD and X-Balance-USD. Uploads need a Content-Length header (every HTTP client does for files). Test keys transcribe files up to 60 seconds.
Transcription billing
- Streams: $0.06 per hour, billed per second from
readyuntil the socket closes, with a 10-second minimum per connection. Cold-start waits and held sessions are free. Close the socket when you're done listening. - Files: $0.05 per hour of audio, billed per second with a 10-second minimum, after the transcript is ready. Failed files cost nothing.
- If your balance runs out mid-stream you get
closingwithinsufficient_balance. Every stream and file appears in your logs and in/v1/usage. - Audio and transcripts are never stored. With ZDR no log rows are written either.
Balance & usage
GET/v1/balance
{ "object": "balance", "balance_usd": 12.34, "characters_remaining": 2468000,
"auto_topup": { "enabled": true, "threshold_usd": 5, "amount_usd": 25, "pending": false, "last_failure": null } }
GET/v1/usage?start=2026-10-01&end=2026-10-31&group_by=day — group_by is day, key or none. Totals include requests, errors, characters, audio seconds and cost.
Warmup & cold starts
Engines run on a pool of machines that sleep a few seconds after their last request and resume in well under a second, so you rarely need this. If a request must be as fast as possible (a live call is about to begin, say), warm up a few seconds beforehand. It is free and limited to once per minute per key.
POST/v1/warmup?wait=true
{ "object": "warmup", "status": "warm", "waited_ms": 0, "instance_uptime_s": null }
Without wait it returns immediately with "warming" or "warm". "warming" means every engine is busy right now; your request is served as soon as one frees up or a new one starts.
Zero data retention
Turn on ZDR for your whole account (Profile) or per key. With ZDR we write no request logs and store none of your text. Character counts and charges are still recorded because they are your billing record, and /v1/usage keeps working. delivery: "url" is rejected with zdr_conflict.
Errors
Errors use OpenAI's shape and always include a stable code and the request_id:
{ "error": { "message": "This request costs $0.000420 but your balance is $0.000100. Add credits or enable auto top-up.",
"type": "billing_error", "code": "insufficient_balance", "param": null, "request_id": "req_8fK2...", "doc_url": "..." } }
If a request fails on our side (5xx), you are not charged. 429 and 503 responses include Retry-After.
| HTTP | code | What to do |
|---|---|---|
| 400 | invalid_request, invalid_json | Fix the parameter named in param. |
| 400 | empty_input | The input had nothing speakable (only emoji or symbols?). |
| 400 | unsupported_format | Use a listed format; streaming needs mp3, opus, aac or pcm. |
| 400 | model_not_found | Use {MODEL}, bread-premium-2, bread-expressive-1 or an OpenAI TTS model name. |
| 400 | language_not_supported | bread-expressive-1 speaks English only. Send other languages with bread-premium-2. |
| 400 | invalid_pronunciation | Words and respellings may contain letters, spaces, apostrophes and hyphens only. |
| 400 | zdr_conflict | Use bytes or json delivery with ZDR. |
| 400 | consent_required | Send consent=true when cloning. |
| 400 | test_key_limit | Test keys allow 100 characters per request. |
| 400 | invalid_setting, invalid_vocabulary | Fix the transcription setting or vocabulary term named in param. |
| 400 | bad_audio | The file couldn't be decoded, or a stream frame didn't match encoding. |
| 400 | invalid_resume_token | Resume tokens last 10 minutes and need the same account and body. Send a new request. |
| 429 | resume_limit | A stream can be resumed 5 times. Send a new request. |
| 401 | invalid_token | Browser tokens are single use and last 60 seconds; mint a new one. Stream resume tokens last 5 minutes; open a new stream. |
| 403 | stt_not_enabled | Speech-to-text isn't enabled for this account; contact support. |
| 404 | session_not_found | The session ended (5 quiet minutes) or was deleted. Create a new one. |
| 409 | session_busy | Close the other stream on this session, or create another session. |
| 413 | file_too_large, audio_too_long | Files are limited to 100 MB and 2 hours; split longer recordings. |
| 401 | missing_api_key, invalid_api_key, api_key_revoked | Check the key or create a new one. |
| 402 | insufficient_balance | Add credits or turn on auto top-up. |
| 402 | monthly_cap_reached | Raise or remove the key's monthly cap. |
| 403 | account_suspended | Contact support. |
| 403 | clone_consent_required | Accept the cloning terms in the dashboard. |
| 403 | test_key_not_allowed | Use a live key for cloning. |
| 404 | voice_not_found | List valid ids with GET /v1/voices. |
| 409 | idempotency_conflict, idempotency_in_progress, idempotency_replay | See retries. |
| 409 | voice_limit_reached, key_limit_reached | Delete an existing voice or key. |
| 410 | link_expired | Download links last 24 hours; generate again. |
| 413 | input_too_long, audio_file_too_large | Split the text, or use stream for up to 20,000 characters. |
| 415 | unsupported_audio_type, unsupported_media_type | Upload a supported audio format; send JSON with the right Content-Type. |
| 422 | clone_audio_too_short, clone_audio_too_long, clone_audio_unusable | Upload 3-60 s of clear speech. |
| 429 | rate_limited, concurrency_limited, test_quota_exhausted, too_many_sessions | Wait for Retry-After seconds. For sessions, end ones you no longer need. |
| 500 | internal_error | Retry; quote the request id if it persists. Not billed. |
| 502 | engine_error | Retry. Not billed. |
| 503 | engine_unavailable, engine_cold_start_timeout | Retry after Retry-After, or warm up first. Not billed. |
| 504 | upstream_timeout | Retry with shorter input. Not billed. |
Retries & idempotency
Send an Idempotency-Key header (any unique string, e.g. a UUID) to make retries safe for 24 hours:
- Same key, same body, first attempt failed → the retry runs normally.
- Same key while the first is still running →
409 idempotency_in_progress. - Same key after success →
409 idempotency_replay; you are not charged again. Fordelivery: "url"the original result is returned inerror.previous_result. - Same key with a different body →
409 idempotency_conflict.
Retry 429, 500, 502, 503 and 504 with exponential backoff. Don't retry other 4xx errors without changing the request.
Limits
| Characters per request | 10,000 (20,000 streaming) |
| Requests per minute | 120 per key (configurable up to 600) |
| Concurrent requests | 10 per account |
| Cloned voices | 20 per account |
| Clone reference audio | 3-60 s, 12 MB |
| Download links | 24 hours |
| Transcription streams | 10 at once per account (each holds a session) |
| Transcription connection length | 2 hours (60 s with test keys); reconnect to continue |
| Transcription audio frames | Mono, 8-48 kHz, 20-100 ms per frame recommended |
| Transcription files | 100 MB and 2 hours (60 s with test keys) |
| Transcription vocabulary | 500 account terms + 100 per request |
| Browser tokens | 60 seconds, single use |
| Request logs | 30 days (none with ZDR) |
Need more? Contact us.
OpenAPI spec
The machine-readable spec is at /v1/openapi.json. Import it into Postman, Insomnia or an SDK generator.