Convert Text to Audio
Available for: Chatflow, Workflow, Chatbot, Agent, Text Generator apps.
Converts text to speech audio. Pass text to synthesize arbitrary text, or message_id to voice an existing message’s answer.
Authorizations
Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).
Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).
Body
Request body for text-to-audio conversion. Provide either message_id or text.
ID of the message whose answer to voice. Takes priority over text when both are provided. Get message IDs from List Conversation Messages.
Text to synthesize into speech.
End-user identifier, defined by your app and unique within it. See End User Identity.
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 Parameters → text_to_speech.voice for the default.
Accepted for backward compatibility but has no effect. Whether the audio is streamed is determined by the configured TTS provider's output, not by this field.
Response
Returns the generated audio file. The Content-Type header is set to the audio MIME type (e.g., audio/wav, audio/mp3). When the configured TTS provider returns a stream, the audio is delivered as audio/mpeg with chunked transfer encoding; the request streaming field does not control this.
The response is of type file.