---
title: "POST /tts"
method: POST
path: "/tts"
---

# POST /tts

`POST /tts`

Convert text into natural-sounding speech using various TTS models from different providers. Supports multiple languages, voices, and customization options including speed control, voice instructions, and audio format selection.

## Request body

- TTSRequest
  - `text` string, required — The text to convert to speech
  - `model` 'Kokoro-82m' | 'Elevenlabs-Turbo-V2.5' | 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts' | 'Minimax-Speech-02-HD' | 'Minimax-Speech-2.6-HD' | 'Minimax-Speech-2.6-Turbo' | 'Minimax-Speech-2.8-HD' | 'Minimax-Speech-2.8-Turbo' | 'Qwen-3-TTS-1.7B' — The TTS model to use for generation
  - `voice` string — The voice to use for synthesis (available voices depend on selected model)
  - `speaker_voice_embedding_file_url` string — Speaker embedding file URL for Qwen TTS voice cloning (Qwen-3-TTS-1.7B only)
  - `reference_text` string — Optional transcript of the reference clip (Qwen TTS)
  - `language` string — Language hint (Qwen TTS). Example values: Auto, English, Chinese, Japanese
  - `prompt` string — Optional style prompt (Qwen TTS)
  - `speed` number — Speech speed multiplier (0.1-5, not supported for gpt-4o-mini-tts)
  - `response_format` 'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm' — Audio output format (OpenAI models only)
  - `instructions` string — Voice instructions for fine-tuning (gpt-4o-mini-tts and tts-1-hd only)
  - `stability` number — Voice stability (Elevenlabs-Turbo-V2.5 only, 0-1)
  - `similarity_boost` number — Voice similarity boost (Elevenlabs-Turbo-V2.5 only, 0-1)
  - `style` number — Style exaggeration (Elevenlabs-Turbo-V2.5 only, 0-1)

## Response `200`

Text-to-speech response. Returns either JSON with audio URL or binary audio data depending on the model.

- TTSResponse
  - `audioUrl` string, uri — URL to the generated audio file
  - `contentType` string — MIME type of the audio file
  - `model` string — Model used for generation
  - `text` string — The input text that was synthesized
  - `voice` string — Voice used for synthesis
  - `speed` number — Speed multiplier used
  - `duration` number — Duration of the generated audio in seconds
  - `cost` number — Cost of the generation
  - `currency` string — Currency of the cost

## Other responses

- `400` — Bad Request - Invalid parameters or missing text
- `401` — Unauthorized - Invalid or missing API key
- `402` — Payment Required - Insufficient balance
- `413` — Payload Too Large - Text exceeds model limits
- `429` — Too Many Requests - Rate limit exceeded
- `500` — Internal Server Error
- `501` — Not Implemented - Model not yet implemented

---

[API](https://skmtc.dev/nano-gpt/apis/nanogpt-api.md) · [All operations](https://skmtc.dev/nano-gpt/apis/nanogpt-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nano-gpt/nanogpt-api/revisions/584e96d146b0/schema)
