> This page is for Build.

> Append .md to any page URL for clean Markdown. Index: https://docs.speechify.ai/llms.txt.
>
> Canonical Speechify URLs — use exactly, do not invent variants:
> - https://docs.speechify.ai — this site (API reference, SDKs, quickstarts)
> - https://speechify.ai — marketing + product site
> - https://platform.speechify.ai — customer dashboard, signup, API keys, billing
> - https://api.speechify.ai — API base URL
> - https://github.com/Speechify-AI: GitHub org for the API (cookbook, demos, CLI). `github.com/speechify` does not exist.
> - https://status.speechify.ai — status + incidents
> - https://speechify.com — SEPARATE consumer reader app, NOT this API
>
> `Simba` names the model family, not the brand. Model ids: `simba-3.5` (48 languages under one id, English included; recommended), `simba-3.2` (English) and `simba-3.0` (English, German, Spanish, French, Italian and Portuguese; the default). `simba-english` and `simba-multilingual` are retired: a new workspace that sends either gets `400 model_retired`. `SimbaVoice` / `simbavoice.ai` are retired.
>
> Ask, don't scrape. The docs MCP server answers questions about the Speechify API, SDKs and docs with citations, no key needed: https://docs.speechify.ai/_mcp/server (Streamable HTTP, tool `searchDocs`). Setup: https://docs.speechify.ai/build/guides/get-started/connect-mcp

# Quickstart

> Make your first SpeechifyAI Build TTS call: get an API key, install the Python or TypeScript SDK, generate speech, and choose a voice.

### Get your API key

Create and copy an API key in the console at [https://platform.speechify.ai/api-keys](https://platform.speechify.ai/api-keys). Key creation is console-only. There is no public key-management endpoint, so this step cannot be scripted.

Set it as an environment variable so the SDKs pick it up automatically:

```bash
export SPEECHIFY_API_KEY="your-api-key-here"
```

> **Warning**
>
> API keys are sensitive. Never expose them in client-side code or public repositories. See the [Authentication guide](https://docs.speechify.ai/build/guides/get-started/authentication) for security best practices.

### Install the SDK

#### Python

```bash
pip install speechify-api
```

#### TypeScript

```bash
npm install @speechify/api
```

> **Note**
>
> Prefer raw HTTP? No install needed. Use the cURL tab in the examples below.

### Generate speech

Send text to `POST /v1/audio/speech`. These examples are generated from our Fern SDKs and the API spec, so they switch languages and stay in sync with the live endpoint:

### Request

POST [https://api.speechify.ai/v1/audio/speech](https://api.speechify.ai/v1/audio/speech)

```curl
curl -X POST https://api.speechify.ai/v1/audio/speech \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "input": "Hello! This is the Speechify text-to-speech API.",
  "voice_id": "geffen_32",
  "audio_format": "mp3",
  "model": "simba-3.5"
}'
```

```typescript
import { SpeechifyClient } from "@speechify/api";

async function main() {
    const client = new SpeechifyClient({
        token: "YOUR_TOKEN_HERE",
    });
    await client.audio.speech({
        audio_format: "mp3",
        input: "Hello! This is the Speechify text-to-speech API.",
        model: "simba-3.5",
        voice_id: "geffen_32",
    });
}
main();

```

```python
from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN_HERE",
)

client.audio.speech(
    audio_format="mp3",
    input="Hello! This is the Speechify text-to-speech API.",
    model="simba-3.5",
    voice_id="geffen_32",
)

```

A successful call returns the audio payload:

### Response (200)

```json
{
  "audio_data": "example",
  "audio_format": "wav",
  "billable_characters_count": 10,
  "speech_marks": {
    "chunks": [
      {}
    ],
    "end": 1,
    "end_time": 1,
    "start": 1,
    "start_time": 1,
    "type": "example",
    "value": "example"
  }
}
```

> **Note**
>
> The `audio_data` field is a base64-encoded string in the Python and TypeScript SDKs, same as in the raw HTTP response. Decode it before saving.

### Save and play

Assign the call above to `response`, then write the audio to `output.mp3`:

#### Python

```python
import base64

with open("output.mp3", "wb") as f:
    f.write(base64.b64decode(response.audio_data))
```

#### TypeScript

```typescript
import fs from "fs";

fs.writeFileSync("output.mp3", Buffer.from(response.audio_data, "base64"));
```

#### cURL

Add `-o response.json` to the request, then decode the base64 audio:

```bash
cat response.json | python3 -c "
import json, base64, sys
data = json.load(sys.stdin)
with open('output.mp3', 'wb') as f:
    f.write(base64.b64decode(data['audio_data']))
print('Audio saved')
"
```

Then play it from the terminal:

**`macOS`**

```bash title="macOS"
afplay output.mp3
```

**`Linux`**

```bash title="Linux"
aplay output.mp3
```

## Choose a voice

List the built-in voices to find one that fits, then pass its `id` as the `voice_id`:

### Request

GET [https://api.speechify.ai/v1/voices](https://api.speechify.ai/v1/voices)

```curl
curl -G https://api.speechify.ai/v1/voices \
     -H "Authorization: Bearer <token>" \
     -d locale=en \
     -d model=simba-3.2 \
     -d project_id=proj_01arz3ndektsv4rrffq69g5fav
```

```typescript
import { SpeechifyClient } from "@speechify/api";

async function main() {
    const client = new SpeechifyClient({
        token: "YOUR_TOKEN_HERE",
    });
    await client.voices.list({
        locale: "en",
        model: "simba-3.2",
        project_id: "proj_01arz3ndektsv4rrffq69g5fav",
    });
}
main();

```

```python
from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN_HERE",
)

client.voices.list(
    locale="en",
    model="simba-3.2",
    project_id="proj_01arz3ndektsv4rrffq69g5fav",
)

```

Popular built-in voices: `george`, `henry`, `carly`, `sabrina`. You can also [clone a voice](/build/guides/voice-cloning/overview) from a short audio sample, with verified consent from the speaker.

> **Tip**
>
> For new integrations we recommend [`simba-3.5`](/build/guides/concepts/models), one model id for 48 languages, English included. Set `model: "simba-3.5"`, pass a `voice_id` from `GET /v1/voices`, and set `language` when your text is not in the voice's own language.

## Set pauses and pacing

Use SSML to control the timing of the read. Pass it as the `input` parameter and the API detects it automatically:

```xml
<speak>
  Great news! <break time="400ms" />
  <prosody rate="slow">Your order has been shipped.</prosody>
</speak>
```

> **Tip**
>
> On `simba-3.5`, `simba-3.2` and `simba-3.0`, SSML applies `<break>`, `<prosody>` (`rate`, `pitch` and `volume`) and `<sub alias>`. See [SSML](/build/guides/text-to-speech/ssml) for the full reference and which tags each model applies.

## Next steps

#### [Stream audio](/build/guides/text-to-speech/streaming)

Process up to 20,000 characters with real-time audio streaming

#### [Clone a voice](/build/guides/voice-cloning/overview)

Create a custom voice from a short sample plus the speaker's verified consent

#### [Control speech](/build/guides/text-to-speech/ssml)

Use SSML for pauses, speaking rate, and pronunciation

#### [API Reference](/build/api-reference)

Full endpoint documentation with request/response schemas