---
title: "Generate"
method: POST
path: "/v1/tts/generate"
---

# Generate

`POST /v1/tts/generate`

Synthesize complete text and stream PCM16 audio.

## Request body

- SynthesizeRequest — One-shot synthesis request (REST and single-request WebSocket).
  - `text` string, required — Text to synthesize
  - `voice_id` union — Voice handle or legacy numeric ID for cloning
    - integer
    - string
  - `cfg_scale` number — Classifier-free guidance scale (clamped to 1.2–2.5)
  - `temperature` number — Sampling variance. 0 = most stable, 1 = most variance.
  - `max_new_tokens` integer — Maximum tokens to generate
  - `sample_rate` integer — Output sample rate in Hz
  - `language` string, nullable — Language code (e.g., 'en', 'de')
  - `model_id` string, nullable — Model to use
  - `normalize` boolean — Enable text normalization
  - `project_id` integer, nullable — Project ID for custom dictionary lookup
  - `dictionary_ids` integer[], nullable — Per-request dictionary selection. Omit for the default behavior (all active dictionaries of the project apply, filtered by language). An empty list disables dictionaries for this request. A list of dictionary IDs applies exactly those dictionaries — including inactive ones — bypassing the language filter.
  - `speed` number — Playback speed multiplier (0.8 = slower, 1.2 = faster)
  - `output_format` string, nullable — Combined codec+rate token (e.g. 'pcm_8000', 'ulaw_8000', 'alaw_8000'). Opt-in; when set it is authoritative and must not contradict 'sample_rate'. Absent ⇒ legacy 'sample_rate' path (linear PCM16).

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/kugelaudio/apis/kugelaudio-tts-api.md) · [All operations](https://skmtc.net/kugelaudio/apis/kugelaudio-tts-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kugelaudio/kugelaudio-tts-api/revisions/9ecca94b0377/schema)
