Skip to main content
POST

Request

Headers

string
required
Bearer token with your API key
string
required
application/json

Body

string
required
The text to convert to speech (max 5000 characters)
string
required
ID of the voice to use. Fetch available voices from GET /voices.
object
Nested audio configuration block (matches the upstream Inworld schema).
string
default:"LINEAR16"
Audio encoding for the streamed response. Options: LINEAR16, OGG_OPUS.
integer
default:"48000"
Output sample rate. Options: 16000, 24000, 48000.
number
default:"1"
Speaking rate. Range 0.5 (slow) – 2.0 (fast). 1.0 = normal.
number
Words per minute (optional). Target speaking rate in WPM. Range 60–300. When omitted, the voice’s default WPM is used (returned as wpm by GET /voices); voices without a measured default fall back to 137 WPM.
integer
default:"50"
Voice consistency 0–100. 0 = expressive, 50 = balanced, 100 = consistent.
integer
default:"75"
Voice match fidelity 0–100. 0 = loose, 75 = strong, 100 = exact clone.
string
default:"WORD"
Set to "WORD" to request per-word timestamps (timestamp_info in the JSON response, timestampInfo in the final NDJSON chunk when streaming). Set to "NONE" to skip. Does not affect the audio fields.
string
Optional cross-lingual synthesis hint (e.g. "en", "hi", "ar"). Required when the voice’s reference audio is in a different language than the input text. Auto-detected from voice metadata when omitted.
boolean
default:"true"
Polish the generated audio. On by default for every request. Set false to skip it for the fastest result, for example when you feed the audio into a live voice agent. The older name enhance still works.
Legacy flat keys (sample_rate, audio_encoding) are still accepted for backwards-compatibility, but new integrations should send the nested audio_config object.

Response

boolean
Indicates if the request was successful
string
Status message
string
Base64-encoded audio file, ready to save or play. For LINEAR16 this is a complete WAV file (16-bit PCM, mono, with header); for OGG_OPUS it is an Ogg file.
number
Audio sample rate in Hz
number
Duration of the audio in seconds (null for OGG_OPUS)
string
Audio encoding: LINEAR16 or OGG_OPUS
string
File format of audio_base64: wav or ogg
string
Legacy field kept for existing integrations: base64 of the raw engine audio (headerless 16-bit mono PCM for LINEAR16). New integrations should use audio_base64.
Streaming: send "stream": true to receive newline-delimited JSON (application/x-ndjson) instead. Each line is {"result":{"audioContent":"<base64>"}} holding a chunk of headerless 16-bit mono PCM (for LINEAR16) at your sample rate; decode and concatenate the chunks in order.