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

Client lifecycle

KugelAudio.create() accepts the same options as the constructor plus model (default "kugel-3"), the model the pooled socket is opened for. KugelAudio is also a context manager, so resources are released automatically:
The async pre-connection methods are also exposed on the TTS resource as client.tts.connect_async() and client.tts.is_connected(). The synchronous connect() method exists, but synchronous generate() and stream() run on their own event-loop thread and do not reuse that socket. Use streaming_session_sync() when a synchronous application needs a persistent streaming connection. stream_async() reuses the pooled socket by default. Pass reuse_connection=False to open a fresh connection for that call.

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.

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