Skip to main content
When several are set, apiUrl wins over region, and region wins over an API-key prefix.

Authentication modes

Most integrations pass a project-scoped API key. For user-token scenarios, set the matching flag:
The active mode is readable from getters: client.isToken, client.orgId, plus client.apiKey, client.ttsUrl, and client.keepalivePingInterval.

Client lifecycle

In Node.js, the pooled WebSocket and its keepalive timer keep the process alive until you call client.close().

Region Selection

Pin traffic to the direct EU endpoint when needed. See the EU endpoint guide for details.
The key prefix is an SDK convenience: the SDK removes it and routes to the EU host. Raw HTTP or WebSocket clients call https://api.eu.kugelaudio.com with the key without the prefix. The full KugelAudioOptions interface is documented in Types & Errors.

Diagnostics

The SDK reports its own connection and streaming failures back to KugelAudio so we can see problems that never reach our servers. It never sends your text, audio or credentials. See SDK Diagnostics for the full field list and the opt-out.

Next steps

Last modified on September 23, 2026