Skip to main content
POST
Audio Speech

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

OpenAI-compatible text-to-speech request.

Synthesizes input text into audio with the given voice. Unknown top-level fields are dropped.

model
string
required

provider/model, e.g. 'openai/tts-1'

input
string
required

The text to synthesize into audio.

voice
string
required

Voice preset, e.g. 'alloy'.

routing
ProviderRoutingPreferences · object | null

How to pick between the providers that serve the requested model. Applies only when model is a model name with no provider prefix (e.g. 'gpt-5.5'); ignored for a concrete 'provider/model' id, which already names its provider. This does not choose the model — for that see router_candidates with model='@edenai'.

response_format
string | null

Audio format: 'mp3', 'opus', 'aac', 'flac', 'wav', or 'pcm'. Defaults to 'mp3'. Note: Gemini TTS models always return WAV and ignore this field.

speed
number | null

Playback speed. OpenAI/Azure TTS accept 0.25-4.0; other providers may use a different range or ignore it.

instructions
string | null

Optional guidance for voice and delivery style.

Response

Successful Response