> ## 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.

# AI Text-to-Speech API

> Generate natural speech from text using Kokoro, Orpheus, and Qwen TTS models. Curl and Python examples for voice generation, voice listing, and audio saving.

export const RuncrateStyles = () => {
  if (typeof document !== 'undefined' && !document.getElementById('runcrate-overrides')) {
    const s = document.createElement('style');
    s.id = 'runcrate-overrides';
    s.textContent = `
      /* Match Runcrate's rounding scale (--radius: 0.75rem) */
      .rounded-sm { border-radius: 0.5rem !important; }   /* 8px */
      .rounded-md { border-radius: 0.625rem !important; } /* 10px */
      .rounded-lg { border-radius: 0.75rem !important; }  /* 12px */
      .rounded-l-sm { border-top-left-radius: 0.5rem !important; border-bottom-left-radius: 0.5rem !important; }
      .rounded-r-sm { border-top-right-radius: 0.5rem !important; border-bottom-right-radius: 0.5rem !important; }
      .rounded-l-md { border-top-left-radius: 0.625rem !important; border-bottom-left-radius: 0.625rem !important; }
      .rounded-r-md { border-top-right-radius: 0.625rem !important; border-bottom-right-radius: 0.625rem !important; }
      .rounded-l-lg { border-top-left-radius: 0.75rem !important; border-bottom-left-radius: 0.75rem !important; }
      .rounded-r-lg { border-top-right-radius: 0.75rem !important; border-bottom-right-radius: 0.75rem !important; }

      /* Cards: never pure white in light mode */
      .card { background-color: #fcfcfc !important; border-radius: 0.75rem !important; }
      html.dark .card { background-color: #141414 !important; }

      /* Docs hero box */
      .rc-hero { background-color: #fcfcfc; border: 1px solid #e0e0e0; }
      html.dark .rc-hero { background-color: #141414; border-color: #242424; }
      html.dark .rc-hero h1 { color: #f5f5f5; }

      /* Runcrate scrollbar — thin, transparent track, hide-until-hover thumb */
      ::-webkit-scrollbar { width: 6px; height: 6px; background-color: transparent; }
      ::-webkit-scrollbar-track { background-color: transparent; }
      ::-webkit-scrollbar-thumb { background-color: rgba(155, 155, 155, 0.5); border-radius: 10px; transition: opacity 0.3s ease; opacity: 0; }
      ::-webkit-scrollbar-thumb:hover { background-color: rgba(155, 155, 155, 0.7); }
      *:hover::-webkit-scrollbar-thumb,
      *:focus::-webkit-scrollbar-thumb,
      *:active::-webkit-scrollbar-thumb { opacity: 1; }
      * { scrollbar-width: thin; scrollbar-color: rgba(155, 155, 155, 0.5) transparent; }
    `;
    document.head.appendChild(s);
  }
  return null;
};

<RuncrateStyles />

Convert text to natural-sounding speech with a single API call. Choose from lightweight models for real-time applications or larger models for studio-quality output.

## Available TTS models

| Model                          | Parameters | Strengths                                        |
| ------------------------------ | ---------- | ------------------------------------------------ |
| `hexgrad/Kokoro-82M`           | 82M        | Ultra-fast, low-latency, good for real-time apps |
| `canopylabs/orpheus-3b-0.1-ft` | 3B         | Expressive speech with emotion control           |
| `Qwen/Qwen3-TTS`               | —          | Multilingual, high-quality prosody               |

***

## Generate speech

<CodeGroup>
  ```bash curl theme={"theme":"github-dark"}
  curl https://api.runcrate.ai/v1/audio/speech \
    -H "Authorization: Bearer rc_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "hexgrad/Kokoro-82M",
      "input": "Welcome to Runcrate. Your GPU instance is ready.",
      "voice": "af_heart"
    }' \
    --output welcome.mp3
  ```

  ```python Python theme={"theme":"github-dark"}
  from openai import OpenAI
  from pathlib import Path

  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="Welcome to Runcrate. Your GPU instance is ready.",
      voice="af_heart",
  )

  Path("welcome.mp3").write_bytes(response.content)
  print("Saved welcome.mp3")
  ```

  ```python Python (Runcrate SDK) theme={"theme":"github-dark"}
  from runcrate import Runcrate

  client = Runcrate(api_key="rc_live_YOUR_API_KEY")

  audio = client.models.generate_speech(
      model="hexgrad/Kokoro-82M",
      input="Welcome to Runcrate. Your GPU instance is ready.",
      voice="af_heart",
  )

  audio.save("welcome.mp3")
  ```
</CodeGroup>

***

## Expressive speech with Orpheus

Orpheus 3B supports emotion tags for more expressive output:

```python theme={"theme":"github-dark"}
from openai import OpenAI
from pathlib import Path

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

response = client.audio.speech.create(
    model="canopylabs/orpheus-3b-0.1-ft",
    input="I just got the results back, and — honestly — I could not be happier.",
    voice="tara",
)

Path("expressive.mp3").write_bytes(response.content)
```

***

## Multilingual speech with Qwen TTS

`Qwen/Qwen3-TTS` handles multiple languages automatically — pass text in any supported language and the model detects it:

```python theme={"theme":"github-dark"}
from openai import OpenAI
from pathlib import Path

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

response = client.audio.speech.create(
    model="Qwen/Qwen3-TTS",
    input="Bienvenido a nuestra plataforma. Su cuenta está lista.",
)
Path("spanish.mp3").write_bytes(response.content)
```

***

## Next steps

* [Models API — Text-to-Speech](/models/text-to-speech) — full parameter reference and supported voices.
* [Batch transcription](/examples/batch-transcription) — go the other direction: speech to text at scale.
* [Model catalog](/models/model-catalog) — browse all available models.
