Skip to main content
POST
/
text-to-audio
Error
A valid request URL is required to generate request examples
"<string>"

Authorizations

Authorization
string
header
required

API Key authentication. For all API requests, include your API Key in the Authorization HTTP Header, prefixed with Bearer. Example: Authorization: Bearer {API_KEY}. Strongly recommend storing your API Key on the server-side, not shared or stored on the client-side, to avoid possible API-Key leakage that can lead to serious consequences.

Body

application/json

Request body for text-to-audio conversion. Provide either message_id or text.

message_id
string<uuid>

Message ID. Takes priority over text when both are provided.

text
string

Speech content to convert.

user
string

User identifier.

voice
string

Voice to use for text-to-speech. Available voices depend on the TTS provider configured for this app. Use the voice value from Get App Parameterstext_to_speech.voice for the default.

streaming
boolean

Whether to enable streaming response.

Response

Returns the generated audio file. The Content-Type header is set to the audio MIME type (e.g., audio/wav, audio/mp3). If streaming is true, the audio is streamed as chunked transfer encoding.

The response is of type file.