Skip to main content
POST
Convert text to speech using a specified voice
Convert any given text into realistic speech using your chosen voice and gender. TextToSpeech enables you to instantly bring written content to life. Perfect for:
  • Creating dynamic audio narrations or voiceovers
  • Choosing gender-specific voice stylings for different contexts
  • Using webhooks for real-time integration with your workflows

Endpoint

Use this endpoint to initiate a new text-to-speech audio generation.

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 Audio

Try it Yourself

Visit the TextToSpeech Endpoint Explorer to try your own text samples.

Request Parameters

content-type: application/json

Sample Request

Python


Sample Response

Success (200 OK)


Webhook Response

Once audio is ready, your webhook will receive:

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

Authorization
string
header
required

Body

application/json
text
string
required

Text to convert to speech

Example:

"Hello, this is a sample text to speech conversion."

sample_audio_url
string
required

An audio URL containing a voice sample of the target speaker without music or overlapping voices. Recommended over voice_id for better output quality.

Example:

"<YOUR_AUDIO_URL>"

voice_id
string

Voice model ID

Example:

"e1cb7380-e3db-433a-b186-a996d7545986"

gender
string

Gender preference for the voice (e.g., "male", "female")

Example:

"female"

webhook_url
string

Callback URL for async processing

Example:

"https://example.com/my-webhook"

Response

Successfully initiated task

success
boolean
task_id
string
conversion_id
string
eta
integer

Estimated processing time in seconds

credit_estimate
number<float>
message
string
status
string