docs

Introduction

Turn text into lifelike speech in 80 languages with one API call.

Overview

The Svara API turns text into lifelike spoken audio. One speech model handles 80 languages with natural code-switching, a growing voice library, zero-shot voice cloning, and token-level streaming. First audio typically arrives in a few hundred milliseconds. Use it to:

  • Give voice agents and chatbots a real voice, in your users’ language
  • Narrate articles, books, and study material at reading speed
  • Drive IVR and telephony flows with 8 kHz μ-law output, no transcoding
  • Speak an LLM’s answer while it is still being written, over WebSocket

Base URL

https://platform.kenpathlabs.com/v1
During the private beta your workspace may be provisioned on a dedicated gateway URL; use the base URL shown in your console settings if it differs.

One API, three dialects

The same server speaks three client protocols, so whatever you already use keeps working by changing only the base URL:

  • OpenAI-style speech: POST /v1/audio/speech, the primary, fully-featured surface. The official OpenAI SDKs work as-is.
  • ElevenLabs-compatible: POST /v1/text-to-speech/{voice_id} and friends, including timestamps and instant voice cloning. The official ElevenLabs SDKs work as-is.
  • WebSocket input streaming: send text fragments as they are produced (for example from an LLM) and receive continuous audio with seamless prosody.

Your first call

POST/v1/audio/speech
curl -X POST https://platform.kenpathlabs.com/v1/audio/speech \
  -H "Authorization: Bearer $SVARA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "voice": "3b5275e4f2",
    "input": "नमस्ते! Welcome to Svara.",
    "response_format": "mp3"
  }' --output hello.mp3   # voice 3b5275e4f2 = Tara

That 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

A machine-readable OpenAPI spec is served live at https://platform.kenpathlabs.com/openapi.json: handy for generating typed clients.