Prerequisites
1
Create an API key
Sign in to the Chariot dashboard and generate an API key. Copy it somewhere safe, you send it on every request.
2
Pick a voice
List the available voices and copy a
voice_id:Synthesize speech
Send text toPOST /v1/tts and save the returned WAV:
Credit-Utilized header reports the cost (1 credit per character).
Stream for low latency
For real-time playback, usePOST /v1/tts/stream. It returns raw 16-bit PCM at 44.1 kHz as it is generated, so you can start playing before synthesis finishes:
Python
The stream is headerless PCM (
audio/L16, 44100 Hz, mono, signed 16-bit little-endian), not a WAV file. Your player must be configured for that format, or you must prepend a WAV header yourself. The fully assembled WAV is also available at the X-audio-url header once the stream completes.Next steps
Choose your API
When to use REST, HTTP streaming, or WebSocket.
WebSocket streaming
Send text incrementally over a persistent connection.
Errors & status codes
Handle failures gracefully.
Credits & pricing
Understand what each request costs.