| Parameter | Type | Default | Description |
|---|---|---|---|
api_key | str | required | Your API key. Can be prefixed with eu- to select the EU endpoint. |
api_url | str | None | https://api.kugelaudio.com | API base URL. For self-hosted deployments, see Self-Hosted Deployment. |
tts_url | str | None | same as api_url | TTS server URL for WebSocket streaming. |
timeout | float | 60.0 | HTTP request timeout in seconds. |
keepalive_ping_interval | float | None | 20.0 | Seconds between WebSocket ping frames on the pooled connection to prevent idle timeouts. Set to None to disable. |
region | str | None | None | Deployment region. Use "eu" for the direct EU endpoint. |
Client lifecycle
KugelAudio is also a context manager, so resources are released automatically:
client.tts.connect(), client.tts.connect_async(), and
client.tts.is_connected() — if you only want to manage the streaming socket.
Region Selection
Pin traffic to the direct EU endpoint when needed. See the EU endpoint guide for details.Next steps
- Generate Speech — one-shot generation and parameters
- Streaming — streaming sessions and barge-in