Introduction
Text to speech over HTTP and WebSocket, in 80 languages, from one endpoint.
Overview
The Svara API converts text to speech over HTTP and WebSocket. One model covers 80 languages and code-switches within a single request, with a library of 320 voices and eight output formats. Streamed, first audio typically arrives in a few hundred milliseconds.
- POST /v1/audio/speech synthesizes text you already have, buffered or streamed
- WS /v1/audio/speech/stream-input takes text as it is produced — an LLM token stream, for example — and returns audio continuously
ulawandalawat 8 kHz come out of the API directly, so telephony needs no transcoding step
Base URL
https://api.kenpathlabs.com/v1Compatibility
The API is request-compatible with the OpenAI and ElevenLabs speech APIs. If your code already calls either one, change the base URL and the key; no other edits are required.
- OpenAI:
POST /v1/audio/speech— the primary endpoint, and the one that exposes every Svara parameter. The official OpenAI SDKs work unmodified. - ElevenLabs:
POST /v1/text-to-speech/{voice_id}and the related streaming, timestamp, and voices endpoints. The official ElevenLabs SDKs work unmodified, including their realtime WebSocket client. - Native WebSocket:
/v1/audio/speech/stream-input— Svara-specific, and the lowest-latency path for LLM-driven speech.
Per-SDK setup, including the /v1 difference between the two base URL conventions, is on SDKs & compatibility.
Your first call
/v1/audio/speechThat mixed Hindi-English input is intentional: send raw text in any supported language, code-switching included, and the model handles it. No SSML, no phoneme markup.
Next steps
- Quickstart: key, first request, and streaming in five minutes
- Text to speech: every request parameter explained
- Input streaming: wire an LLM’s output straight into speech
- SDKs & compatibility: using the OpenAI and ElevenLabs SDKs
https://api.kenpathlabs.com/openapi.json: handy for generating typed clients.