Quickstart
Make your first text-to-speech API call in 5 minutes
Get your API key
- Sign up at console.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
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:
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: