> ## 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.

# Self-Hosted Deployment

> Run KugelAudio TTS on your own infrastructure

KugelAudio TTS can be deployed on your own infrastructure. We ship to **Kubernetes clusters** and provide a **Helm chart** for installation, configuration, and upgrades.

## Get in touch

Self-hosted deployments are arranged through sales. Reach out and we'll send the Helm chart, a license key, and walk you through the rollout.

<Card title="Contact sales" icon="envelope" href="mailto:hello@kugelaudio.com">
  [hello@kugelaudio.com](mailto:hello@kugelaudio.com)
</Card>

## Connect your SDK

Point the SDK at your deployment by setting the API URL directly. This
overrides both the `region` parameter and any API key prefix.

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from kugelaudio import KugelAudio

    client = KugelAudio(
        api_key="your_api_key",
        api_url="http://localhost:8000",
    )
    ```

    Or with separate backend and TTS servers:

    ```python theme={null}
    client = KugelAudio(
        api_key="your_api_key",
        api_url="http://localhost:8001",   # Backend for REST API
        tts_url="http://localhost:8000",   # TTS server for WebSocket streaming
    )
    ```
  </Tab>

  <Tab title="JavaScript">
    ```typescript theme={null}
    import { KugelAudio } from 'kugelaudio';

    const client = new KugelAudio({
      apiKey: 'your_api_key',
      apiUrl: 'http://localhost:8000',
    });
    ```

    Or with separate backend and TTS servers:

    ```typescript theme={null}
    const client = new KugelAudio({
      apiKey: 'your_api_key',
      apiUrl: 'http://localhost:8001',   // Backend for REST API
      ttsUrl: 'http://localhost:8000',   // TTS server for WebSocket streaming
    });
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    import com.kugelaudio.sdk.*;

    KugelAudio client = new KugelAudio(
        KugelAudioOptions.builder("your_api_key")
            .apiUrl("http://localhost:8000")
            .build()
    );
    ```

    Or with separate REST and TTS servers:

    ```java theme={null}
    KugelAudio client = new KugelAudio(
        KugelAudioOptions.builder("your_api_key")
            .apiUrl("http://localhost:8001")   // Backend for REST API
            .ttsUrl("http://localhost:8000")   // TTS server for WebSocket streaming
            .build()
    );
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST http://localhost:8000/v1/tts/generate \
      -H "Authorization: Bearer $KUGELAUDIO_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"text": "Hello from KugelAudio!", "model_id": "kugel-3"}'
    ```
  </Tab>
</Tabs>

Replace `localhost` with your deployment hostname in production.
