---
title: "Text to speech"
method: POST
path: "/api/audio/speech"
tags: ["multimodal"]
---

# Text to speech

`POST /api/audio/speech`

Convert text to speech through the Respan gateway with automatic logging.

## Headers

- `Authorization` string, required
- `X-Data-Respan-Params` string

## Request body

- object
  - `model` 'tts-1' | 'tts-1-hd', required — TTS model.
  - `input` string, required — Text to generate audio for. Max 4096 characters.
  - `voice` 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer', required — Voice to use.
  - `response_format` 'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm' — Audio output format.
  - `speed` number, double — Audio speed (0.25 to 4.0).
  - `customer_credentials` ApiAudioSpeechPostRequestBodyContentApplicationJsonSchemaCustomerCredentials — Per-customer LLM provider credentials.
  - `disable_log` boolean — When `true`, omits input/output from the log. Metrics still recorded.
  - `metadata` ApiAudioSpeechPostRequestBodyContentApplicationJsonSchemaMetadata — Custom key-value metadata.
  - `customer_identifier` string — End user identifier.
  - `thread_identifier` string — Conversation thread ID.

## Response `200`

Audio content in the requested format.

## Other responses

- `401` — Unauthorized

---

[API](https://skmtc.net/keywordsai/apis/api-reference.md) · [All operations](https://skmtc.net/keywordsai/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/keywordsai/api-reference/revisions/4e064cf81dae/schema)
