> ## Documentation Index
> Fetch the complete documentation index at: https://runcrate.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Text-to-Speech

> Convert text to natural-sounding speech with multiple voice options.

Generate speech audio from text input using TTS models.

## Endpoint

```
POST https://api.runcrate.ai/v1/audio/speech
```

## Basic Usage

```bash curl theme={"theme":{"light":"github-light","dark":"catppuccin-mocha"}}
curl https://api.runcrate.ai/v1/audio/speech \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer rc_live_YOUR_API_KEY" \
  --output speech.mp3 \
  -d '{
    "model": "hexgrad/Kokoro-82M",
    "input": "Hello, welcome to Runcrate!",
    "voice": "af_heart"
  }'
```

```python Python theme={"theme":{"light":"github-light","dark":"catppuccin-mocha"}}
from openai import OpenAI

client = OpenAI(
    base_url="https://api.runcrate.ai/v1",
    api_key="rc_live_YOUR_API_KEY",
)

response = client.audio.speech.create(
    model="hexgrad/Kokoro-82M",
    input="Hello, welcome to Runcrate!",
    voice="af_heart",
)
response.stream_to_file("speech.mp3")
```

```javascript JavaScript theme={"theme":{"light":"github-light","dark":"catppuccin-mocha"}}
import OpenAI from "openai";
import fs from "fs";

const client = new OpenAI({
  baseURL: "https://api.runcrate.ai/v1",
  apiKey: "rc_live_YOUR_API_KEY",
});

const response = await client.audio.speech.create({
  model: "hexgrad/Kokoro-82M",
  input: "Hello, welcome to Runcrate!",
  voice: "af_heart",
});
const buffer = Buffer.from(await response.arrayBuffer());
fs.writeFileSync("speech.mp3", buffer);
```

## Parameters

| Parameter | Type | Description |
| - | - | - |
| `model` | string | Model ID (required) |
| `input` | string | Text to synthesize (required) |
| `voice` | string | Voice preset name |
| `response_format` | string | Output format (`mp3`, `pcm`) |

## Available Models & Voices

### Kokoro 82M

Lightweight, fast TTS with natural-sounding voices.

Voices: `af_heart`, `af_bella`, `af_nicole`, `af_sky`, `am_adam`, `am_michael`, `bf_emma`, `bf_isabella`, `bm_george`, `bm_lewis`

### Qwen3 TTS

Multilingual TTS from Alibaba.

Voices: `Vivian`, `Serena`, `Uncle_Fu`, `Dylan`, `Eric`, `Ryan`, `Aiden`, `Ono_Anna`, `Sohee`

### Voice-Clone Models

Some models (such as Chatterbox Multilingual) support voice cloning: they don't have preset voices but can clone from reference audio.

## Response

The response body is raw audio binary (MP3 or PCM). Save it directly to a file or stream it to an audio player.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.