Audio Speech
OpenAI-compatible text-to-speech endpoint.
Accepts a JSON body (model, input, voice plus optional
response_format / speed / instructions) and returns raw audio
bytes; cost and provider are returned in the x-edenai-* response
headers.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
OpenAI-compatible text-to-speech request.
Synthesizes input text into audio with the given voice. Unknown
top-level fields are dropped.
provider/model, e.g. 'openai/tts-1'
The text to synthesize into audio.
Voice preset, e.g. 'alloy'.
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'.
Audio format: 'mp3', 'opus', 'aac', 'flac', 'wav', or 'pcm'. Defaults to 'mp3'. Note: Gemini TTS models always return WAV and ignore this field.
Playback speed. OpenAI/Azure TTS accept 0.25-4.0; other providers may use a different range or ignore it.
Optional guidance for voice and delivery style.
Response
Successful Response