Text-to-Speech API

Turn text into natural speech with one API call

The text-to-speech API turns text into natural-sounding audio from a single request. This page takes you from an API key to saved audio in a few minutes, then points to the streaming, voice, and SSML guides once you have the basics working.

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
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 come straight from the SDKs and the live spec:

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}'

A successful call returns the audio payload:

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}
The SDKs return decoded audio bytes. The raw HTTP response base64-encodes the audio in the audio_data field, so decode it before saving.

Request essentials

The speech endpoint takes a small, predictable set of fields.

FieldRequiredNotes
inputYesThe text (or SSML) to speak. Up to 2,000 characters on the speech endpoint.
voice_idYesA built-in, curated, or cloned voice ID.
modelNoDefaults to simba-english. Use simba-3.2 for new English integrations.
audio_formatNoOutput format such as mp3 or wav.
For new integrations, 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. See Models.

Choose a voice

Call GET /v1/voices to list the voices your workspace can use - the shared catalog plus any voices you’ve cloned - then pass a voice’s id as the voice_id:

GET
/v1/voices
1curl -G https://api.speechify.ai/v1/voices \
2 -H "Authorization: Bearer <token>" \
3 -d locale=en \
4 -d model=simba-3.2

Popular built-in voices: george, henry, carly, sabrina.

Filter the list

Four optional query parameters narrow the results. Combine them freely.

ParameterValuesReturns
typepersonal, sharedYour cloned voices (personal) or the public catalog (shared). Omit for both.
localeA BCP-47 range, e.g. en or en-USVoices whose locale matches the range. Prefix-matched and case-insensitive: en matches en-US and en-GB; en-US matches en-US.
gendermale, female, not_specifiedVoices of that gender.
modelA model ID, e.g. simba-3.2Voices that advertise the model in their models[].

For example, list the catalog voices that speak English and support simba-3.2:

$curl "https://api.speechify.ai/v1/voices?type=shared&locale=en&model=simba-3.2" \
> -H "Authorization: Bearer $SPEECHIFY_API_KEY"

Page through the catalog

GET /v1/voices supports cursor pagination. For callers using API version 2026-07-16 or later, it returns a page even when limit is omitted (default page size 50, max 200). Each response carries a next_cursor and a has_more flag. To read the full catalog, request the next page with cursor set to the previous response’s next_cursor, and stop once has_more is false. Don’t assume a single response holds every voice - always follow has_more.

$# First page
$curl "https://api.speechify.ai/v1/voices?limit=100" \
> -H "Authorization: Bearer $SPEECHIFY_API_KEY"
$
$# Next page, using next_cursor from the previous response
$curl "https://api.speechify.ai/v1/voices?limit=100&cursor=NEXT_CURSOR" \
> -H "Authorization: Bearer $SPEECHIFY_API_KEY"

Narrow the list

GET /v1/voices accepts optional query filters, applied before pagination so pages stay full. Combine them to return only the voices you care about:

FilterValuesMatches
typepersonal, sharedYour workspace’s cloned voices, or the shared public catalog. Omit for both.
localeA BCP-47 rangePrefix-matched and case-insensitive: en matches en-US and en-GB; en-US matches only en-US. Omit for all locales.
gendermale, female, not_specifiedOmit for all genders.
modelA model ID, e.g. simba-3.2Voices that list the model in their models. Omit for all models.

For example, return only English cloned voices that work on simba-3.2:

$curl "https://api.speechify.ai/v1/voices?type=personal&locale=en&model=simba-3.2" \
> -H "Authorization: Bearer $SPEECHIFY_API_KEY"

The full catalog is returned in one response by default. Pagination is opt-in: pass limit (then cursor from the previous response) to page through the list while has_more is true, up to a page size of 200.

Next steps