Skip to content

Synthesize speech (query params)

GET
/v1/adapters/tts/{engine}
curl --request GET \
--url 'https://example.com/v1/adapters/tts/polly?format=mp3&fallback=true' \
--header 'Authorization: Bearer <token>'

Synthesizes speech from the query parameters and streams the audio. Either text or text_b64 is required.

engine
required
string
Allowed values: polly azure gc ya ya_v3 techmo elevenlabs alfanum voxtream

TTS engine selector.

voice
string

Voice id. Short alias v.

language
string

Language code. Short alias l.

text
string

Plain text to synthesize. Required unless text_b64 is set.

text_b64
string

Base64-encoded text. Required unless text is set.

speed
string

Speech speed. Short alias s.

format
string
default: mp3

Audio format. Short alias f. Defaults to mp3.

sampleRate
integer

Sample rate in Hz. Short alias sr.

model
string

Provider model. Short alias m.

fallback
boolean
default: true

Allow voice fallback. Short alias fb. Defaults to true.

v
string

Short alias for voice.

l
string

Short alias for language.

s
string

Short alias for speed.

f
string

Short alias for format.

sr
integer

Short alias for sampleRate.

m
string

Short alias for model.

fb
boolean

Short alias for fallback.

advanced_settings

Provider-specific free-form synthesis settings, supplied as dot-delimited nested query keys of the form advanced_settings.<section>.<key>=<value> (alias prefix as), e.g. as.s.param1=100. The keys are flattened into a nested object per section; the accepted sections and keys are provider-specific.

object
key
additional properties
any
skip_uri_length_validation
boolean

Skip the freeswitch URI length guard when true.

Synthesized audio stream.

string format: binary
X-Cache
string

1 on cache hit, 0 otherwise.

Content-Disposition
string

Error response.

Media typeapplication/json
object
code
required
string
reason
required
string
message
required
string
Examplegenerated
{
"code": "example",
"reason": "example",
"message": "example"
}

Error response.

Media typeapplication/json
object
code
required
string
reason
required
string
message
required
string
Examplegenerated
{
"code": "example",
"reason": "example",
"message": "example"
}

Forbidden

Error response.

Media typeapplication/json
object
code
required
string
reason
required
string
message
required
string
Examplegenerated
{
"code": "example",
"reason": "example",
"message": "example"
}

Error response.

Media typeapplication/json
object
code
required
string
reason
required
string
message
required
string
Examplegenerated
{
"code": "example",
"reason": "example",
"message": "example"
}