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

# Use the API without an SDK

> Base URL, authentication forms, and tooling for calling the KugelAudio API directly.

Everything our SDKs do goes over the public HTTP + WebSocket API — you can use
it directly from any language. This page covers the connection basics; each
endpoint's full message reference lives on its own page.

## Base URL

```
https://api.kugelaudio.com
```

## Authentication

Include your API key in requests:

```bash theme={null}
# HTTP header
Authorization: Bearer YOUR_API_KEY

# Or as header
x-api-key: YOUR_API_KEY

# WebSocket query parameter
wss://api.kugelaudio.com/ws/tts?api_key=YOUR_API_KEY
```

See [Authentication](/api-reference/authentication) for key management.

## Sending text safely

<Warning>
  **Non-ASCII characters (umlauts, accents, CJK, etc.):** when calling the API
  directly, set `Content-Type: application/json; charset=utf-8`, normalize
  your text to **Unicode NFC** before sending, and always set the `language`
  parameter explicitly. Without these steps, characters like `ä`, `ö`, `ü`,
  `ß` may be garbled or mispronounced. Our SDKs handle this automatically.
</Warning>

## Tooling for WebSockets

The streaming endpoints are plain JSON-over-WebSocket. For interactive
exploration use [`wscat`](https://github.com/websockets/wscat)
(`npm install -g wscat`) or [`websocat`](https://github.com/vi/websocat):

```bash theme={null}
wscat -c "wss://api.kugelaudio.com/ws/tts?api_key=YOUR_API_KEY"
> {"text": "Hello, this is a test.", "model_id": "kugel-3", "voice_id": 1071}
```

Every endpoint page includes complete raw-WebSocket examples in Python and
JavaScript alongside the wire-format tables.

## Endpoints

<CardGroup cols={2}>
  <Card title="Generate Speech" icon="play" href="/api-reference/tts/generate">
    REST one-shot — also the canonical request parameter reference
  </Card>

  <Card title="Stream Speech" icon="wave-square" href="/api-reference/tts/stream">
    One request, audio chunks streamed over a WebSocket
  </Card>

  <Card title="Stream Input" icon="keyboard" href="/api-reference/tts/stream-input">
    Token-by-token text input, turn-based sessions for LLM agents
  </Card>

  <Card title="Multi-Context" icon="layer-group" href="/api-reference/tts/multi-context">
    Up to 20 independent audio streams over one connection
  </Card>

  <Card title="Audio Formats" icon="file-audio" href="/api-reference/tts/audio-formats">
    PCM, G.711 telephony codecs, chunk fields, watermark
  </Card>

  <Card title="Voices" icon="users" href="/api-reference/endpoints/voices">
    List, inspect, and clone voices
  </Card>
</CardGroup>
