v1

latestOpenAPI 3.1.02026-07-2219165126.1 KB
Audio

Create speech

Convert text into speech audio and stream the generated bytes.

post/v1/audio/speech

Request body

modelstring required

Text-to-speech model identifier.

inputstring required

Text to synthesize into speech audio.

voicestring required

Voice preset to synthesize with.

speednumber

Optional playback speed multiplier.

instructionsstring
response_format'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm' nullable

Example request

{
  "input": "Welcome to NagaAI. Your job finished successfully.",
  "model": "gpt-4o-mini-tts",
  "response_format": "mp3",
  "voice": "alloy"
}

Response

Generated audio stream.