v1

latestOpenAPI 3.1.0MIT2026-07-262861121.0 KB

Convert text into natural-sounding speech using various TTS models from different providers. Supports multiple languages, voices, and customization options including speed control, voice instructions, and audio format selection.

post/tts

Request body

textstring required

The text to convert to speech

model'Kokoro-82m' | 'Elevenlabs-Turbo-V2.5' | 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts' | 'Minimax-Speech-02-HD' | 'Minimax-Speech-2.6-HD' | 'Minimax-Speech-2.6-Turbo' | 'Minimax-Speech-2.8-HD' | 'Minimax-Speech-2.8-Turbo' | 'Qwen-3-TTS-1.7B'

The TTS model to use for generation

voicestring

The voice to use for synthesis (available voices depend on selected model)

speaker_voice_embedding_file_urlstring

Speaker embedding file URL for Qwen TTS voice cloning (Qwen-3-TTS-1.7B only)

reference_textstring

Optional transcript of the reference clip (Qwen TTS)

languagestring

Language hint (Qwen TTS). Example values: Auto, English, Chinese, Japanese

promptstring

Optional style prompt (Qwen TTS)

speednumber

Speech speed multiplier (0.1-5, not supported for gpt-4o-mini-tts)

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

Audio output format (OpenAI models only)

instructionsstring

Voice instructions for fine-tuning (gpt-4o-mini-tts and tts-1-hd only)

stabilitynumber

Voice stability (Elevenlabs-Turbo-V2.5 only, 0-1)

similarity_boostnumber

Voice similarity boost (Elevenlabs-Turbo-V2.5 only, 0-1)

stylenumber

Style exaggeration (Elevenlabs-Turbo-V2.5 only, 0-1)

Example request

{
  "text": "Hello! This is a test of the text-to-speech API.",
  "voice": "af_bella",
  "instructions": "speak with enthusiasm"
}

Response

Text-to-speech response. Returns either JSON with audio URL or binary audio data depending on the model.

audioUrlstring uri

URL to the generated audio file

contentTypestring

MIME type of the audio file

modelstring

Model used for generation

textstring

The input text that was synthesized

voicestring

Voice used for synthesis

speednumber

Speed multiplier used

durationnumber

Duration of the generated audio in seconds

costnumber

Cost of the generation

currencystring

Currency of the cost

Example response

{
  "audioUrl": "https://storage.url/audio-file.wav",
  "contentType": "audio/wav"
}