Quickstart
Make your first speech synthesis request
Get your API key
- Sign up at platform.speechify.ai
- Go to API Keys
- Copy your default API key (or create a new one)
Set it as an environment variable so the SDKs pick it up automatically:
API keys are sensitive. Never expose them in client-side code or public repositories. See the Authentication guide for security best practices.
Install the SDK
Python
TypeScript
Prefer raw HTTP? No install needed. Use the cURL tab in the examples below.
Generate speech
Send text to POST /v1/audio/speech. These examples are generated from our Fern SDKs and the API spec, so they switch languages and stay in sync with the live endpoint:
A successful call returns the audio payload:
Response
The Python and TypeScript SDKs return decoded audio bytes. The raw HTTP response base64-encodes the audio in the
audio_data field, so decode it before saving.Choose a voice
List the built-in voices to find one that fits, then pass its id as the voice_id:
Popular built-in voices: george, henry, carly, sabrina. You can also clone any voice from a short audio sample.
Add emotion
Use SSML to control how the voice sounds. Pass it as the input parameter and the API detects it automatically:
SSML also controls pitch, rate, pauses, and emphasis. See SSML and Emotion Control for the full reference.