Official SDKs

Client libraries for Python and TypeScript

Python

$pip install speechify-api

TypeScript / JavaScript

$npm install @speechify/api

The old @speechify/api-sdk package is deprecated. See the changelog to upgrade.

Make a request

After installing, call any endpoint — the SDKs read SPEECHIFY_API_KEY from the environment automatically. Not using an SDK? The cURL tab shows the equivalent raw HTTP request.

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

See the API Reference for all available endpoints.

Environment variables

Both SDKs read the SPEECHIFY_API_KEY environment variable automatically:

$export SPEECHIFY_API_KEY="your-api-key-here"

You can also pass the key explicitly when creating the client. See the Authentication guide for security best practices.