> 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/SpeechifyInc — GitHub org. `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 (1.6 multilingual, 3.0 streaming multilingual, 3.2 streaming English), not the brand. `SimbaVoice` / `simbavoice.ai` are retired.

# 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"
```

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

### Install the SDK

#### Python

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

#### TypeScript

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

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.2"
}'
```

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

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

```

```python
from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN_HERE",
)

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

```

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"
  }
}
```

The Python and TypeScript SDKs return decoded audio bytes. The raw HTTP response base64-encodes the audio in the `audio_data` field, so decode it before saving.

### Save and play

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

#### Python

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

#### TypeScript

```typescript
import fs from "fs";

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

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

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

```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
```

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

For new integrations we recommend the streaming-native [`simba-3.2`](/build/guides/concepts/models) model — set `model: "simba-3.2"` and pass one of its curated voices (`beatrice_32`, `dominic_32`, `edmund_32`, `geffen_32`, `harper_32`, `hugh_32`, `imogen_32`, `wyatt_32`) as the `voice_id`.

## Add emotion

Use SSML to control how the voice sounds. Pass it as the `input` parameter and the API detects it automatically:

```xml
<speak>
  <speechify:style emotion="cheerful">
    Great news! Your order has been shipped!
  </speechify:style>
</speak>
```

SSML also controls pitch, rate, pauses, and emphasis. See [SSML](/build/guides/text-to-speech/ssml) and [Emotion Control](/build/guides/text-to-speech/emotion-control) for the full reference.

## 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 10-30 second audio sample

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

Use SSML for pitch, rate, pauses, and emphasis

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

Full endpoint documentation with request/response schemas