# API reference

Every endpoint, with links to the page that documents it.

Every endpoint, with links to the page that documents it in full. The live OpenAPI spec is at `https://api.kenpathlabs.com/openapi.json`.

## Speech

```http
POST /v1/audio/speech
```

Primary TTS: text in, audio out; set `stream` for a chunked response. Every response carries an `x-request-id` — send your own and it is echoed back. See [Text to speech](https://docs.kenpathlabs.com/text-to-speech.md).

```http
POST /v1/text-to-speech/{voice_id}
```

```http
POST /v1/text-to-speech/{voice_id}/stream
```

```http
POST /v1/text-to-speech/{voice_id}/with-timestamps
```

```http
POST /v1/text-to-speech/{voice_id}/stream/with-timestamps
```

ElevenLabs-compatible synthesis, incl. streaming and character timestamps (one JSON object, or newline-delimited objects when streamed; timings are word-accurate, character-approximate). `output_format` like `mp3_44100_128`, `pcm_24000`. See [SDKs](https://docs.kenpathlabs.com/sdks.md).

## WebSocket

```http
WS /v1/audio/speech/stream-input
```

Native input streaming with `mode=eager`. Send text fragments, receive PCM. See [Input streaming](https://docs.kenpathlabs.com/input-streaming.md).

```http
WS /v1/text-to-speech/{voice_id}/stream-input
```

ElevenLabs-compatible realtime WebSocket (BOS/text/flush/EOS protocol).

## Voices

```http
GET /v1/voices
```

```http
GET /v1/voices/{voice_id}
```

```http
GET /v1/voices/{voice_id}/preview
```

Roster, single voice, and bundled preview clip. No auth.

```http
GET /v2/voices
```

Search and paging over the same 320-voice roster (the ElevenLabs SDK’s `voices.search()`): `search` matches every word against id, name, accent, gender, description and labels; `page_size` (1–100), `next_page_token`, `category`. Needs a key.

```http
GET /v1/voices/{voice_id}/settings
```

Stub for ElevenLabs SDK compatibility: returns permissive defaults so client flows that read voice settings don’t break.

## Utility

```http
GET /health
```

Liveness: `{"status": "healthy"}`. No auth.

```http
GET /v1/languages
```

```http
GET /v1/models
```

Supported languages, and the one model: `svara-tts-turbo`. No auth.

```http
GET /v1/pronunciation-dictionaries
```

```http
GET /v1/pronunciation-dictionaries/{id}
```

```http
POST /v1/pronunciation-dictionaries/add-from-rules
```

List, read and create [pronunciation dictionaries](https://docs.kenpathlabs.com/pronunciation.md) with your API key. Creation is all-or-nothing; deletion is in the console.

```http
GET /v1/usage
```

```http
GET /v1/user/subscription
```

Your plan, balance and month-to-date usage — the second is the ElevenLabs-shaped dialect. See [Usage & subscription](https://docs.kenpathlabs.com/usage-api.md).
