docs

SDKs & compatibility

The official OpenAI and ElevenLabs SDKs work unmodified. Change one URL.

OpenAI SDKs

The official OpenAI Python and JavaScript SDKs work against Svara unmodified: point base_url at Svara and pass your key. Svara-specific fields ride in extra_body (Python) or as extra properties (JS).

pip install openai
from openai import OpenAI

client = OpenAI(base_url="https://platform.kenpathlabs.com/v1", api_key=SVARA_API_KEY)
audio = client.audio.speech.create(
    model="svara-1",
    voice="3b5275e4f2",  # Tara
    input="Namaste!",
    response_format="mp3",
    extra_body={"lang": "hindi", "stream": False},   # svara extensions
)
audio.write_to_file("out.mp3")

ElevenLabs SDKs

The official ElevenLabs SDKs also work unmodified, including instant voice cloning and the realtime WebSocket. Pass any non-empty api_key; its presence is also how GET /v1/models decides to answer in the ElevenLabs array shape.

pip install elevenlabs
from elevenlabs.client import ElevenLabs

client = ElevenLabs(base_url="https://platform.kenpathlabs.com", api_key=SVARA_API_KEY)
audio = client.text_to_speech.convert(
    voice_id="3b5275e4f2",  # Tara
    text="Namaste!",
    model_id="eleven_multilingual_v2",   # accepted, ignored
    output_format="mp3_44100_128",
)

Base URL conventions

Mind the /v1: OpenAI SDKs include it in the base URL (https://platform.kenpathlabs.com/v1), while ElevenLabs SDKs do not (https://platform.kenpathlabs.com); they append v1/… themselves.

Compatibility surface

What maps, and what to expect:

  • Full support: TTS + streaming, all output formats and rates, timestamps, the realtime WebSocket, voices list/search/clone/edit, models, languages.
  • Accepted and ignored: voice_settings (stability/similarity/style/speed), seed, model_id, pronunciation dictionaries, previous_text/next_text, request stitching. These don’t map onto this model; requests including them still succeed.
  • Stubbed: user/subscription and voice-settings endpoints return valid, permissive shapes so SDK flows don’t break.

A machine-readable OpenAPI document is served live at https://platform.kenpathlabs.com/openapi.json: generate typed first-party clients from it (Fern, Stainless, Scalar) when you want them. Native Svara SDKs aren’t published yet: both official SDKs already cover the REST surface, and input streaming is a short WebSocket wrapper (see the examples).