For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
ExamplesConsole
OverviewText to SpeechAPI ReferenceChangelog
OverviewText to SpeechAPI ReferenceChangelog
  • API Reference
    • Introduction
    • Authentication
  • Text to Speech
LogoLogo
ExamplesConsole
On this page
  • Response format
  • Errors

Introduction

Was this page helpful?

Authentication

Every API request requires an API key.
Next
Built with

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

Install an official SDK to get started:

Python
TypeScript
$pip install speechify-api
Python
TypeScript
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.

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
400Invalid request parameters
401Missing or invalid API key
402Insufficient account balance
429Rate or concurrency limit exceeded
500Server error

Error responses include a JSON body with an error field describing the issue.