v1

latestOpenAPI 3.1.0Apache 2.02026-07-264001921002.3 KB
OpenAI Integration

Create speech (OpenAI TTS)

Generates audio from text using OpenAI TTS. Supports streaming via SSE when stream_format is set to 'sse'.

Note: This endpoint also works without the /v1 prefix (e.g., /openai/audio/speech).

post/openai/v1/audio/speech

Request body

modelstring required

Model identifier (e.g., tts-1, tts-1-hd)

inputstring required

Text to convert to speech

voice'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer'

Voice to use

response_format'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm'
speednumber
stream_format'sse'

Set to 'sse' for streaming

fallbacksstring[]

Example request

{
  "model": "tts-1"
}

Response

Successful response