Text to speech (Qwen TTS)

Convert text to speech with qwen3-tts-flash or qwen3-tts-instruct-flash. Both support multiple languages and voices and return audio bytes synchronously.

POST /v1/audio/speech

Auth: {'type': 'bearer', 'prefix': 'sk-', 'description': 'API Key, `Authorization: Bearer sk-xxx`'}

Qwen TTS Text-to-Speech — `qwen3-tts-flash` (basic) / `qwen3-tts-instruct-flash` (supports emotion/speed control) ## Features - Multi-language: Chinese / English / Japanese / etc. - Voice: `Cherry` (default) / `Ethan` / etc. - Output format: `mp3` (default) / `wav` PCM 16-bit 24kHz mono - Synchronously returns audio bytes (compatible with OpenAI tts-1, seamless integration for existing OpenAI SDK projects)

Request body

modelstringrequiredTTS model. `qwen3-tts-flash` Basic version; `qwen3-tts-instruct-flash` supports `instructions` for emotion/speed control
inputstringrequiredText to be synthesized. Mixed Chinese-English input is supported. Billing is based on character count
voicestringVoice name. Aliyun system: `Cherry` (default) / `Ethan` / others. If not provided or OpenAI-style (alloy/echo/...) is passed, it will fallback to `Cherry`
response_formatstringAudio format. `qwen3-tts-flash` accepts `mp3`/`wav`; `qwen3-tts-instruct-flash` upstream does not accept this field, defaults to `wav`
instructionsstring(Only `qwen3-tts-instruct-flash`) Natural language instructions, control tone/speed/emotion
speednumber(OpenAI-compatible field) Aliyun version is ineffective; use `instructions` instead

Responses

Example

curl -X POST https://api.router.ai/v1/audio/speech \
  -H 'Authorization: Bearer sk-xxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "qwen3-tts-flash",
    "input": "你好世界",
    "voice": "Cherry",
    "response_format": "mp3"
  }' \
  --output speech.mp3

API reference