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)
model | string | required | TTS model. `qwen3-tts-flash` Basic version; `qwen3-tts-instruct-flash` supports `instructions` for emotion/speed control |
input | string | required | Text to be synthesized. Mixed Chinese-English input is supported. Billing is based on character count |
voice | string | Voice name. Aliyun system: `Cherry` (default) / `Ethan` / others. If not provided or OpenAI-style (alloy/echo/...) is passed, it will fallback to `Cherry` | |
response_format | string | Audio format. `qwen3-tts-flash` accepts `mp3`/`wav`; `qwen3-tts-instruct-flash` upstream does not accept this field, defaults to `wav` | |
instructions | string | (Only `qwen3-tts-instruct-flash`) Natural language instructions, control tone/speed/emotion | |
speed | number | (OpenAI-compatible field) Aliyun version is ineffective; use `instructions` instead |
200 — successfully returns audio binary stream400 — parameter error (model not supported / voice does not exist / input is empty, etc.), transparently passes upstream error messagecurl -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