Text-to-Speech Quickstart

From API key to a playable audio file, fast

The fastest path from nothing to a playable audio file. Follow the steps in order and you will hear generated speech at the end.

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)
$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
3

Generate speech

POST
/v1/audio/speech
1curl -X POST https://api.speechify.ai/v1/audio/speech \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "input": "Hello! This is the Speechify text-to-speech API.",
6 "voice_id": "geffen_32",
7 "audio_format": "mp3",
8 "model": "simba-3.2"
9}'
Response
1{
2 "audio_data": "example",
3 "audio_format": "wav",
4 "billable_characters_count": 10,
5 "speech_marks": {
6 "chunks": [
7 {}
8 ],
9 "end": 1,
10 "end_time": 1,
11 "start": 1,
12 "start_time": 1,
13 "type": "example",
14 "value": "example"
15 }
16}
4

Save and play

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

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

Then play it:

$afplay output.mp3
For new integrations, use model: "simba-3.2" with a curated voice such as geffen_32. See Models.

Next steps