Stream speech (real-time TTS)

Streaming variant of `/v1/audio/speech`. Returns Server-Sent Events as the model synthesizes, with sub-130ms time-to-first-byte on Inworld TTS Mini, sub-250ms on Max. Use this for voice agents and other interactive playback paths. Event types: * `audio.chunk`: base64-encoded audio bytes with `seq`, `format`, `sample_rate`, and `elapsed_ms` fields. Concatenate client-side for progressive playback. * `audio.timestamps`: emitted when `timestamp_type` is `WORD` or `CHARACTER`, carrying per-token timing info. * `audio.done`: final event with the assembled hosted URL, total duration, and usage payload for billing. * `audio.error`: only on upstream errors; followed by `[DONE]`. * `[DONE]`: terminator (standard SSE). Currently supported on Inworld TTS Mini / Max. Other TTS models use the synchronous `/v1/audio/speech` endpoint. Cancelled streams are billed for the characters synthesized up to the cancellation point.

Authentication

AuthorizationBearer

Pass your EmpirioLabs API key as a bearer token. The Anthropic-style x-api-key header is also accepted on every endpoint.

Request

This endpoint expects an object.
modelstringRequired
inputstringRequired
Text to synthesize. Max 3000 characters per request.
voicestringOptional
voice_idstringOptional

Free-form voice ID; use to address the full 271-voice catalog.

languagestringOptional
output_formatenumOptionalDefaults to WAV
Allowed values:
sample_rateenumOptionalDefaults to 24000
speeddoubleOptionalDefaults to 1
temperaturedoubleOptionalDefaults to 1
timestamp_typeenumOptionalDefaults to NONE
Allowed values:

Response

Server-Sent Events stream (text/event-stream).