- Preamble — a short acknowledgement that can play immediately.
- First sentence — the first complete sentence from the model response.
- Remainder — the rest of the response, split only at natural sentence boundaries.
Concurrency budget
Studio and Developer API generations share the account’s concurrent-generation limit. Starter accounts have six concurrent generations, so a character application should normally use an application-side semaphore of 5. The spare slot leaves room for Studio activity, cancellation overlap, and another product flow. One logical reply split into three simultaneous requests consumes three slots. A second reply can therefore reach the six-slot account limit before the first reply finishes. When that happens, Breeze returns429 GENERATION_CONCURRENCY_EXCEEDED with Retry-After; it does not queue the request on your behalf.
Retry policy
- Retry
429after the delay inRetry-After, adding a small amount of jitter. - Retry transient
502,503, and504responses with bounded exponential backoff. - Do not retry
400or422without changing the request. - Set a maximum attempt count and discard remainders that have lost their playback value.
- Log the Breeze request or trace ID, HTTP status, and stable error code. Do not log API keys or full private dialogue text.
Python example
TypeScript example
async-mutex package. You can replace it with any bounded semaphore already used by your application.
Language handling
The language_code field is optional. If omitted, it remains absent and the inference model handles the text directly. An omittedmodel_id selects breeze-tts-2 only for explicit language_code: en or zh; other or omitted languages select breeze-tts-2-multilingual. Explicit models are preserved and validated, never switched automatically. Explicit language codes must be supported by the selected model: use breeze-tts-2-multilingual for Japanese and other supported languages beyond English and Chinese. See supported language codes.
Choosing HTTP or realtime WebSocket
Use HTTP streaming when you already have a complete preamble or sentence and want independent encoded streams. Use the realtime text-to-speech WebSocket when text arrives incrementally and you want one persistent synthesis connection with turn cancellation and barge-in.Rate limits
Review account concurrency,
Retry-After, and realtime session limits.
