Skip to main content
POST
Text to speech

Body

application/json

Request body for text-to-speech conversion.

input
string
required

Text to convert into speech. Required.

language
string | null

Optional language code to control language/voice selection.

response_format
enum<string>
default:mp3

Desired audio format for the returned speech.

Available options:
mp3,
wav,
opus,
flac,
aac
speed
number
default:1

Playback speed multiplier for the generated speech (1.0 = normal).

stream_format
enum<string>
default:audio

Whether the response will be streamed as SSE or returned as raw audio.

Available options:
sse,
audio

Response

Audio bytes in requested response_format

The response is of type file.