Skip to main content
POST
Async TTS with retrieval

Authorizations

Authorization
string
header
required

API key with format "Bearer sk_api_..."

Body

application/json

Request for asynchronous text-to-speech synthesis

text
string
required

The text to synthesize

Maximum string length: 2500
Example:

"سلام، آپ اِس وقت اوریٹر کی آواز سن رہے ہیں۔"

outputFormat
enum<string>
required

Format of the output audio. Wav files are usually 10x larger, we recommend using MP3 or OGG for best compression results while maintaining quality.

Available options:
PCM_22050_16,
WAV_22050_16,
WAV_22050_32,
MP3_22050_32,
MP3_22050_64,
MP3_22050_128,
OGG_22050_16,
ULAW_8000_8
voiceId
string

Identifier for the voice to use. Named voices: v_meklc281 (Urdu female), v_8eelc901 (Info/Edu), v_kwmp7zxt (Gen Z), v_yypgzenx (Dada Jee), v_30s70t3a (Nostalgic News)

Example:

"v_meklc281"

phraseReplacementConfigId
string

Optional ID of a phrase replacement configuration to apply

Response

Successfully initiated audio synthesis

Response containing mediaId and token for retrieving synthesized audio

mediaId
string

Unique identifier for the generated audio media

Example:

"media_abc123xyz"

token
string

JWT token for secure retrieval of the audio

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."