Use the API without an SDK
Call the KugelAudio API without an SDK from any language: API keys and the EU endpoint, sending text safely, and tools for testing WebSocket connections.
On this page
Everything our SDKs do goes over the public HTTP and WebSocket API, so you can call it directly from any language. The base URL, authentication, error shape, and the list of endpoints are on the API Reference landing page; this page covers what you need on top of that when you have no SDK.
Keys and the EU endpoint
Send the key as Authorization: Bearer YOUR_API_KEY, X-API-Key, or
?api_key= on WebSocket URLs (see Authentication).
The eu- key prefix is understood only by the SDKs: for the EU endpoint, call
https://api.eu.kugelaudio.com and send the key without the prefix.
Sending text safely
Tooling for WebSockets
The streaming endpoints are plain JSON-over-WebSocket. For interactive
exploration use wscat
(npm install -g wscat) or websocat:
wscat -c "wss://api.kugelaudio.com/ws/tts?api_key=YOUR_API_KEY"
> {"text": "Hello, this is a test.", "model_id": "kugel-3.5", "voice_id": 1071}A refused connection (bad key, connection limit) is an HTTP status on the upgrade, not a WebSocket close code; see Error Codes.
Every streaming endpoint page includes complete raw-WebSocket examples in Python and JavaScript alongside the wire-format tables: start with Stream Speech for one request at a time or Stream Input for LLM token streams.