base_url. No other code changes required.
Quick Start
Python SDK
Node.js SDK
Migrating from ElevenLabs
The only changes needed:- Replace
base_url— point to your KugelAudio server - Update
voice_id— use KugelAudio voice IDs (not ElevenLabs IDs) - Update
output_format— use a PCM format (see Output Formats)
Output Formats
KugelAudio generates audio natively at 24 kHz PCM16. Lower sample rates use server-side resampling.| Format | Status | Notes |
|---|---|---|
pcm_24000 | ✅ Recommended | Native rate, zero conversion cost |
pcm_22050 | ✅ Supported | |
pcm_16000 | ✅ Supported | Common for telephony |
pcm_8000 | ✅ Supported | |
mp3_* | ⚠️ Not yet | Convert client-side (see below) |
ulaw_8000 | ⚠️ Not yet | Convert client-side (see below) |
Converting PCM to MP3 or µ-law client-side
If your downstream system requires MP3 or µ-law (e.g. telephony platforms like Twilio), convert after receiving the PCM stream:Supported Endpoints
Text-to-Speech
| Endpoint | Method | Status |
|---|---|---|
/v1/text-to-speech/{voice_id} | POST | ✅ Supported |
/v1/text-to-speech/{voice_id}/stream | POST | ✅ Supported |
/v1/text-to-speech/{voice_id}/stream-input | WebSocket | ✅ Supported |
stream-input: Feed text tokens as they arrive from an LLM — synthesis starts as soon as a sentence boundary is detected, minimizing time-to-first-audio. The server sends ElevenLabs-format audio frames ({"audio": "<base64>", "isFinal": false}) and closes with {"audio": "", "isFinal": true}.
Voices
| Endpoint | Method | Status |
|---|---|---|
/v1/voices | GET | ✅ Supported |
/v1/voices/{voice_id} | GET | ✅ Supported |
/v1/voices/add | POST | ❌ Not supported |
/v1/voices/{voice_id}/edit | POST | ❌ Not supported |
Other
| Endpoint | Method | Status |
|---|---|---|
/v1/models | GET | ✅ Supported |
/v1/user | GET | ⚠️ Stub |
/v1/user/subscription | GET | ⚠️ Stub |
/v1/history | GET | ⚠️ Stub |
Available Models
| Model ID (ElevenLabs alias) | KugelAudio model | Description |
|---|---|---|
eleven_turbo_v2, eleven_turbo_v2_5 | kugel-1-turbo | Fast, low-latency |
eleven_multilingual_v2 | kugel-1 | High quality, multilingual |
kugel-1-turbo and kugel-1 are accepted.
Parameter Mapping
| ElevenLabs | KugelAudio | Notes |
|---|---|---|
voice_id | voice_id | Use KugelAudio voice IDs |
model_id | model | See model table above |
similarity_boost | cfg_scale | cfg_scale = 1.0 + (similarity_boost × 2.0) |
stability | — | Not used |
Troubleshooting
Python SDK
Native KugelAudio SDK with full feature access
JavaScript SDK
Native KugelAudio SDK with full feature access