- ๐ Creating dynamic audio narrations or voiceovers
- ๐งโ๐ผ Choosing gender-specific voice stylings for different contexts
- ๐ Using webhooks for real-time integration with your workflows
Endpoint
Sample Output
Prompt: When I think of superheroes I think of super humans. I think of Superman, Wolverine and Wonder Woman. Usually they have a cape, or a mask to hide their face just in case. They have X-ray vision and super-human strength. Some can even breathe in outer space. They fly around a while, but always come back to keep our cities safe. Theyโre here to save humanity from itself. Itโs a metaphor for how we look outside ourselves for help, and while the fantasies are fun, I choose to look for me and you. Download AudioTry it Yourself
Visit the TextToSpeech Endpoint Explorer to try your own text samples.
๐ก Tip: Set a webhook_url
to receive results automatically when your audio is ready.
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
text | String | Yes | The text content to convert to speech |
voice_id | String | Optional | Voice model to apply for synthesis. Either voice_id or sample_audio_url must be provided |
sample_audio_url | String | Optional | URL of Voice you want. Either voice_id or sample_audio_url must be provided |
gender | String | Yes | Gender of the voice (โmaleโ, โfemaleโ) |
webhook_url | String | No | URL to receive a callback with generated audio |
Note: You must provide eithervoice_id
oraudio_url
โ not both asNone
.
Sample Request
Python
Sample Response
Success (200 OK)
Webhook Response
Once audio is ready, your webhook will receive:
๐ง Use the audio_url
to listen or download your synthesized speech.
Error Codes
- 402 Payment Required: Not enough credits to process the request
- 422 Unprocessable Entity: Invalid or missing fields
- 500 Internal Server Error: Server-side failure during processing
Payload and Request Formation
Authorizations
Body
application/json
Text to convert to speech
An audio URL containing a voice sample of the target speaker without music or overlapping voices. Recommended over voice_id for better output quality.
Voice model ID
Gender preference for the voice (e.g., "male", "female")
Callback URL for async processing