Kenpath Labs

Quickstart

Create a key, make a request, and stream the response.

Get an API key

Create a key in the console under API keys. Keys look like sk_live_… and are shown once at creation; store them in a secret manager or environment variable, never in client code or version control.

export SVARA_API_KEY="sk_live_..."

Make your first request

The svara-voice SDK is the shortest path. If you already use the OpenAI SDK, point it at the Svara base URL instead — the request shape is the same:

pip install git+https://github.com/kenpath-labs/svara-python.git
from svara import Svara
client = Svara() # reads SVARA_API_KEY
audio = client.speech.create(
input="नमस्ते! Welcome to Svara.",
voice="sv_enhdbrj5", # Aanya
response_format="mp3",
)
open("hello.mp3", "wb").write(audio)

Stream it

Set stream: true and consume chunks as they arrive; with pcm output the first bytes land in a few hundred milliseconds rather than after the whole clip is generated. If the text comes from an LLM, use the WebSocket input-streaming API instead — it accepts text while the model is still writing, so synthesis doesn’t wait for a complete sentence:

from svara import Svara
client = Svara()
for chunk in client.speech.stream(
input="This sentence starts playing before it finishes generating.",
voice="sv_enhdbrj5", # Aanya
response_format="pcm", # 24 kHz, 16-bit LE, mono
):
player.feed(chunk) # your audio sink
# from an LLM? one WebSocket, speech before the sentence ends:
# async for audio in AsyncSvara().speech.stream_input(deltas(), voice="sv_enhdbrj5"): ...

Format choices, playback, and telephony output are on the Streaming page.

Explore voices and languages

These endpoints are public, no key required:

  • GET /v1/voices: the current voice roster, each with a preview_url
  • GET /v1/languages: all 80 supported languages, for building pickers
  • GET /v1/models: available models
The console playground runs the same API from the browser: try voices, languages, and multi-speaker scenes without writing code.