---
title: "Synthesize speech from text"
method: POST
path: "/v1/tts"
tags: ["Speech"]
---

# Synthesize speech from text

`POST /v1/tts`

Render the given text as speech (24 kHz mono WAV) in the requested speaker's voice.

## Request body

- TtsRequest
  - `text` string, required — Text to speak.
  - `speaker` string — Speaker role to render the text as (one of the model's `speakers`; see GET /v1/models).
  - `model` string, nullable — Public model id (see GET /v1/models). Omit/null for the default model.
  - `params` GenParamsModel — Generation knobs, all optional — the defaults are the tuned production sampling, shared by every generation endpoint (served with UI ranges at GET /v1/info).
    - `temperature` number
    - `acoustic_temperature` number, nullable — Temperature for the voice's fine acoustic detail; null = follow `temperature`.
    - `top_k` integer, nullable — Sample from the k most-likely tokens; null = full vocabulary.
    - `max_new_tokens` integer, nullable — Optional generation cap; null uses the model's remaining context window.
    - `audio_quality` 'low' | 'medium' | 'high' — Playback fidelity: high = full quality (default); lower tiers reduce fidelity, not payload size.

## Response `200`

Successful Response

- TtsResponse
  - `request_id` string, required — Correlation id; identical to the `X-Request-ID` response header.
  - `model` string, required — Resolved public model id that served the request.
  - `text` string, required — The text that was spoken (echoes the request).
  - `audio` AudioPayload, required
    - `format` string — Container/encoding of `data_b64` (16-bit PCM WAV).
    - `sample_rate` integer, required — Sample rate of the audio in Hz.
    - `audio_quality` 'low' | 'medium' | 'high', required — Fidelity tier this audio was rendered at (high = full quality).
    - `data_b64` string, required — Base64-encoded 16-bit PCM WAV (mono).
  - `usage` Usage, required
    - `input_chars` integer — Characters of input text billed for this request.
    - `input_audio_seconds` number — Seconds of input audio supplied (converse).
    - `output_audio_seconds` number — Seconds of audio generated.
  - `meta` object — Backend-specific diagnostics (latency, frames, …).

## Other responses

- `400` — Semantically invalid request.
- `401` — Missing or invalid API key.
- `422` — Request validation failed.
- `429` — Rate limit exceeded.
- `500` — Unexpected internal error.
- `502` — The inference backend failed.
- `503` — API-key verification is temporarily unavailable.

---

[API](https://skmtc.net/kalpalabs/apis/kalpa-speech-api.md) · [All operations](https://skmtc.net/kalpalabs/apis/kalpa-speech-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kalpalabs/kalpa-speech-api/revisions/60add3abf640/schema)
