Introduction

Base URL, authentication, response formats, and error codes for the Speechify API

The Speechify API is a RESTful service at https://api.speechify.ai. All requests require an API key in the Authorization header.

Authorization: Bearer YOUR_API_KEY

For raw HTTP integrations, also send a dated API version header:

1Speechify-Version: 2026-06-25

The official SDKs send their build-date version automatically. See API Versioning for the resolution order and deprecation policy.

Install an official SDK to get started:

$pip install speechify-api
1from speechify import Speechify
2
3client = Speechify() # uses SPEECHIFY_API_KEY env var

Set the SPEECHIFY_API_KEY environment variable and the SDKs authenticate automatically.

Example request

A minimal text-to-speech call. The request and response below are generated from the API specification, so they stay in sync with the live endpoint.

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": "george",
7 "audio_format": "mp3",
8 "model": "simba-english"
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}

Response format

All non-streaming endpoints return JSON. Audio data is base64-encoded in the audio_data field. The streaming endpoint returns raw audio chunks via HTTP chunked transfer encoding.

Errors

The API uses standard HTTP status codes:

StatusMeaning
400Bad request
401Missing or invalid API key
402Insufficient account balance
403Forbidden (insufficient scope or resource off-limits)
404Resource not found
409Conflict with current state
413Payload too large
422Request validation failed
429Rate or concurrency limit exceeded
500Internal server error
502Upstream provider failure
503Service unavailable

Every non-2xx response uses the same JSON envelope:

1{
2 "error": {
3 "code": "voice_not_found",
4 "message": "Voice 'voice_demo0001' does not exist."
5 },
6 "request_id": "7f3a2c1b4d5e6f7a"
7}

Check error.code in your SDK exception handler — it is a stable, machine-readable identifier you can branch your error handling on. error.message is human-friendly and may change between releases. error.fields (omitted unless relevant) carries per-field validation errors as path → message. request_id echoes the X-Request-ID response header; quote it when filing support tickets.