Not sure which to use? See Choosing an API.
The request
All three take the same core inputs:string
required
UUID of the voice to synthesize with. Get one from
GET /v1/voices.string
required
The text to speak. After trimming whitespace, sync accepts 1 to 700 characters for
chariot-v0 or 1 to 1,000 for chariot-multilingual-v1. HTTP streaming accepts 1 to 500 or 1 to 1,000 respectively. The WebSocket accepts incremental fragments within the same limits as HTTP streaming, including the accumulated unflushed buffer.string
default:"chariot-v0"
Use
chariot-v0 or chariot-multilingual-v1. Pass this in the JSON body for sync and HTTP streaming, or the connection URL query for WebSocket. See Models.number
default:"1.0"
Select a speaking rate from the voice’s entry for your model in
models[].speeds. Chariot v0 supports only 1.0. Pass this as a query parameter on WebSocket connections.integer
default:"0"
An integer from
0 to 4. Higher values trade quality passes for lower latency. Pass this as a query parameter on WebSocket connections.Example
This example explicitly selects Chariot Multilingual v1. Choose a voice whosemodels array includes chariot-multilingual-v1.
Response metadata
The synchronous endpoint returns audio in the body and metadata in headers:
The streaming endpoint uses
X-inference-id and X-audio-url for the same purpose. Its Credit-Utilized header reports the request cost; billing occurs after successful delivery.
Formats and sample rate
- Sync (
POST /v1/tts): WAV, 44.1 kHz, mono. - Streaming (
POST /v1/tts/stream): raw signed 16-bit little-endian PCM (audio/L16), 44.1 kHz, mono, no WAV header. TheX-audio-urlheader points to a WAV archive uploaded after generation. Archiving is best effort, so retain the streamed audio if you need a guaranteed local copy.
Cost
TTS costs 1 credit per input character. A 200-character request costs 200 credits. If a generation fails after you were charged, the credits are refunded. See Credits & pricing.Next steps
Choosing an API
REST vs. streaming vs. WebSocket, with a decision table.
WebSocket streaming
The full real-time protocol.
Voices
Browse the voice catalog.
Rate limits & concurrency
How many requests you can run at once.