Skip to navigation

Quickstart

Make your first speech synthesis request
Make my first Speechify TTS call
Add Speechify text-to-speech to my project. Get me from an API key to a playable audio file: install the official SDK for my language, read `SPEECHIFY_API_KEY` from the environment, call the speech endpoint, and write the result to a file I can play. Follow [https://docs.speechify.ai/build/guides/get-started/quickstart.md](https://docs.speechify.ai/build/guides/get-started/quickstart.md).
1

Get your API key

  1. Sign up at platform.speechify.ai
  2. Go to API Keys
  3. Copy your default API key (or create a new one)

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

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 for security best practices.

2

Install the SDK

pip install speechify-api
Prefer raw HTTP? No install needed. Use the cURL tab in the examples below.
3

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:

POST
/v1/audio/speech
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.2",
voice_id="geffen_32",
)

A successful call returns the audio payload:

Response
{
"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 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.
4

Save and play

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

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

Then play it from the terminal:

afplay output.mp3

Choose a voice

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

GET
/v1/voices
from speechify import Speechify
client = Speechify(
token="YOUR_TOKEN_HERE",
version="string",
)
client.voices.list(
cursor="string",
limit=50,
)

Popular built-in voices: george, henry, carly, sabrina. You can also clone a voice from a short audio sample, with verified consent from the speaker.

For new integrations we recommend the streaming-native simba-3.2 model — set model: "simba-3.2" and pass any English voice_id from GET /v1/voices (for example geffen_32). Your workspace’s cloned voices work there too.

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:

<speak>
Great news! <break time="400ms" />
<prosody rate="slow">Your order has been shipped.</prosody>
</speak>
On simba-3.2 and simba-3.0, SSML applies <break>, <prosody rate> and <sub alias>. See SSML for the full reference and which tags each model applies.

Next steps