Skip to main content
POST
Python (SDK)

Authorizations

Authorization
string
header
required

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

Headers

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Body

application/json

Request parameters for text-to-speech conversion with language selection.

text
string
required

Input text to convert to speech

Minimum string length: 1
language
enum<string>
default:auto

Language code: 'auto' for automatic detection, or ISO 639-1 language codes

Available options:
auto,
en,
zh,
hi,
es,
ar,
bn,
pt,
ru,
ja,
pa,
de,
ko,
fr,
tr,
it,
th,
pl,
nl,
id,
vi,
ur
model
string
default:auto

TTS model identifier. Defaults to 'auto', which selects the default provider. Registry-resolvable ids dispatch to the matching provider.

Example:

"auto"

store
boolean
default:false

When true, persist this generation (input text, parameters, and the generated audio) to text-to-speech history. Defaults to false.

Response

200 - audio/wav

Audio file in WAV format with language code header

The response is of type file.