Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kugelaudio.com/llms.txt

Use this file to discover all available pages before exploring further.

KugelAudio runs in multiple regions. By default, all traffic goes to the EU endpoint — existing API keys and SDK code continue to work without changes.

Available Regions

RegionEndpointLocation
EU (default)api.kugelaudio.comEurope
USus-api.kugelaudio.comUnited States
Globalglobal-api.kugelaudio.comGeo-routed to nearest region

Choosing a Region

Pick the region closest to your servers (or your users, for client-side apps). If your users are spread across continents, use Global to let geo-routing handle it.

How to Set Your Region

There are three ways to select a region, all supported by every SDK.

Option 1: Prefix Your API Key

Prepend us-, global-, or eu- to your API key. The prefix is stripped automatically before authentication — the server never sees it. This is the simplest approach, especially when your API key comes from an environment variable:
# .env
KUGELAUDIO_API_KEY=us-ka_your_api_key_here
No code changes needed — the SDK detects the prefix and routes accordingly.

Option 2: Set the Region in Code

All SDKs accept an explicit region parameter:
from kugelaudio import KugelAudio

client = KugelAudio(api_key="ka_your_api_key", region="us")

# Also works with the async factory
client = await KugelAudio.create(api_key="ka_your_api_key", region="global")

Option 3: Set the API URL Directly

If you need full control over the endpoint — for example, when using a self-hosted deployment or a proxy — you can pass the URL directly. This overrides both the region parameter and any key prefix.
from kugelaudio import KugelAudio

client = KugelAudio(
    api_key="ka_your_api_key",
    api_url="https://us-api.kugelaudio.com",
)

Priority

When multiple region hints are present, the SDK resolves them in this order:
  1. apiUrl — explicit URL always wins
  2. region — explicit region parameter
  3. API key prefixus-, global-, or eu-
  4. Default — EU (api.kugelaudio.com)

WebSocket Connections

Region selection applies to both REST and WebSocket endpoints. The SDK automatically uses the correct regional host for WebSocket connections:
wss://us-api.kugelaudio.com/ws/tts?api_key=YOUR_API_KEY

FAQ

No. The default is EU and all existing API keys and code continue to work exactly as before.
Yes. All regions serve the same models and have access to the same voice library, including your custom voices.
Yes. Your API key works in any region — just change the prefix or region parameter. No need to regenerate keys.
Global (global-api.kugelaudio.com) uses geo-routing to direct your request to the nearest regional deployment, minimizing network latency automatically.