- Host: every request goes to
https://tts.thinnest.ai. - Key: use a full-access API key from Settings → API keys, sent as
Authorization: Bearer <key>. A build or read-only key cannot speak, because speech spends money. - A developer acting for a customer: add
X-Workspace: <customer id>, as on the rest of the API.
OpenAI-compatible: POST /v1/audio/speech
This takes the same request as OpenAI’s speech API, so OpenAI SDKs and the tools built on them work with two changes:
the base URL https://tts.thinnest.ai/v1 and your key.
Native: POST /v1/speech
This adds what OpenAI’s shape cannot carry: 8 and 16 kHz output, and mu-law for phone lines.
format:pcm,wav,mulaw,mp3oropus.sample_rate:8000,16000or24000. mp3 and opus are 24000 only.- Streaming: audio streams back as it is made.
- Headers: the response carries
X-Request-Id,X-Characters(what the request counted, free or charged), andX-Concurrency-LimitandX-Concurrency-In-Use.
WebSocket: wss://tts.thinnest.ai/v1/stream
One connection carries many utterances, each with an id, and each can be cancelled mid-sentence. Use it for live
conversations.
To get raw bytes instead of base64, add
"binary": true. Each frame is then: 1 byte for the id’s length, the id, then
the audio.
Browsers cannot send an Authorization header on a WebSocket, so connect from your server.
Voices
GET https://app.thinnest.ai/api/v1/tts/voices lists the catalogue.