Skip to main content
The KugelAudio API provides programmatic access to our text-to-speech services. This reference documents all available endpoints, request/response formats, and authentication.

Base URL

All API requests should be made to:
This is the canonical geo-routed endpoint. For the direct EU endpoint, see Regions. Only the SDKs understand the eu- key prefix. When you call the API directly, use https://api.eu.kugelaudio.com and send the key without the eu- prefix.

Authentication

Send your API key as Authorization: Bearer YOUR_API_KEY (or X-API-Key), or as ?api_key= on WebSocket URLs. GET /v1/models is public; everything else requires a key. See Authentication for all accepted forms and key management.
Keep your API key secret! Never expose it in client-side code or public repositories.
To call the API from a language without an SDK, including WebSocket tooling and text-encoding tips, see Use the API without an SDK.

Requests and responses

HTTP requests send JSON (Content-Type: application/json); WebSocket messages are JSON frames over wss://. Success bodies are endpoint-specific: catalog endpoints return JSON, synthesis endpoints return binary audio or WebSocket JSON frames. Errors share one shape:
See Error Codes for every status, error_code, and WebSocket close code. Rate-limit errors are 429 RATE_LIMITED, with a Retry-After header when retry timing is available.

Endpoints Overview

Text-to-Speech

Speech-to-Text

Voices

Models

Dictionaries

Usage

There is no usage REST endpoint. Per-session usage (audio seconds and the amount charged) is delivered inline on the streaming surfaces as the usage block of the terminal frame (see Stream and Multi-context, or session.lastUsage / getLastUsage() in the SDKs). Account-level totals and history live in the dashboard.

SDKs

We provide official SDKs for easy integration:

Python SDK

pip install kugelaudio

JavaScript SDK

npm install kugelaudio

Java SDK

com.kugelaudio:kugelaudio

Versioning

Public REST resources and the speech-to-text stream use the /v1/ URL prefix (/v1/audio/transcriptions/stream). The text-to-speech WebSocket routes are under /ws/tts.
Last modified on September 22, 2026