Audio

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.

post/v3/audio/speech

Request

  • Base URL
    https://api.edenai.run
  • Auth
    HTTP bearer

Request body

tagsunknown
modelstring required

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

inputstring required

The text to synthesize into audio.

voicestring nullable

Voice to synthesize with: a voice id or name from GET /v3/audio/voices?model=..., matched case-insensitively (e.g. 'alloy'). Omit it to use the model's default voice. A voice id the catalog does not know is sent to the provider unchanged.

response_formatstring nullable

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

speednumber nullable

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

instructionsstring nullable

Optional guidance for voice and delivery style.

Example request

{
  "tags": {
    "client": "acme",
    "project": "invoices"
  }
}

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.