Skip to main content
POST
Generate Text-to-Speech Audio

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Request model for TTS generation.

text
string
required

Text to convert to speech

Required string length: 1 - 10000
Example:

"Hello, this is a text-to-speech test."

speaker_id
enum<integer>
default:248

Speaker voice for TTS generation

Available options:
241,
242,
243,
245,
246,
248
Examples:

248

246

response_mode
enum<string>
default:url

How to return the audio: 'url' for signed URL, 'stream' for streaming, 'both' for streaming with final URL

Available options:
url,
stream,
both

Response

Audio generated successfully

Response model for TTS generation (URL mode).

success
boolean
required

Whether the request was successful

audio_url
string
required

Signed URL to access the audio file

expires_at
string<date-time>
required

When the signed URL expires

file_name
string
required

Name of the audio file in storage

duration_estimate_seconds
number | null

Estimated audio duration in seconds

text_length
integer | null

Length of the input text

speaker_id
enum<integer> | null

Speaker voice used for generation

Available options:
241,
242,
243,
245,
246,
248
speaker_name
string | null

Human-readable speaker name