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.

Authentication

Protected API requests require authentication using an API key. Include your API key in the Authorization header:
The native API also accepts X-API-Key: YOUR_API_KEY. Health checks and GET /v1/models are public; synthesis, voice, and dictionary endpoints require authentication. See Authentication for the exact forms and key-management guidance. Or for WebSocket connections, as a query parameter:
Keep your API key secret! Never expose it in client-side code or public repositories.

Request Format

HTTP Requests

  • Content-Type: application/json
  • Accept: application/json or audio/* for TTS endpoints

WebSocket Connections

  • Protocol: WebSocket (wss://)
  • Messages: JSON-encoded

Response Format

Success Responses

Success bodies are endpoint-specific. Catalog endpoints return JSON objects, voice-reference listing returns a JSON array, and synthesis endpoints return binary audio or WebSocket JSON frames. See the endpoint page for the exact shape.

Error Responses

Error Codes

See Error Codes for the full lookup table, including HTTP status codes, error_code values, client-facing messages, and WebSocket close codes.

Rate Limits

Rate limit errors use error_code: "RATE_LIMITED" and HTTP status 429. If retry timing is available, it is sent as the HTTP Retry-After header.

Endpoints Overview

Text-to-Speech

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

Versioning

Public REST resources use the /v1/ URL prefix. WebSocket routes are exposed under /ws/tts.