API reference · Alibaba

alibaba/qwen-3-tts/1.7b

Integrate this model through SandBase's unified API, with production-ready schemas and examples.

AUDIOAsyncOpen model
Production endpoint

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

POSThttps://api.sandbase.ai/v1/run
Model IDalibaba/qwen-3-tts/1.7b
01

Input Schema

15 parameters · 1 required · 14 optional

ParameterTypeRequiredDescription
promptstringRequiredOptional prompt to guide the style of the generated speech. This prompt will be ignored if a speaker embedding is provided.
textstringOptionalThe text to be converted to speech.
top_kintegerOptionalTop-k sampling parameter. · Min: 0 · Default: 50
top_pnumberOptionalTop-p sampling parameter. · Min: 0 · Max: 1 · Default: 1
voicestringOptionalThe voice to be used for speech synthesis, will be ignored if a speaker embedding is provided. Check out the **[documentation](https://github.com/QwenLM/Qwen3-TTS/tree/main?tab=readme-ov-file#custom-voice-generate)** for each voice's details and which language they primarily support. · Options: Vivian, Serena, Uncle_Fu, Dylan, Eric, Ryan, Aiden, Ono_Anna, Sohee
VivianSerenaUncle_FuDylanEricRyanAidenOno_AnnaSohee
languagestringOptionalThe language of the voice. · Options: Auto, English, Chinese, Spanish, French, German, Italian, Japanese, Korean, Portuguese, Russian · Default: "Auto"
AutoEnglishChineseSpanishFrenchGermanItalianJapaneseKoreanPortugueseRussian
temperaturenumberOptionalSampling temperature; higher => more random. · Min: 0 · Max: 1 · Default: 0.9
max_new_tokensintegerOptionalMaximum number of new codec tokens to generate. · Min: 1 · Max: 8192 · Default: 200
reference_textstringOptionalOptional reference text that was used when creating the speaker embedding. Providing this can improve synthesis quality when using a cloned voice.
subtalker_top_kintegerOptionalTop-k for sub-talker sampling. · Min: 0 · Default: 50
subtalker_top_pnumberOptionalTop-p for sub-talker sampling. · Min: 0 · Max: 1 · Default: 1
repetition_penaltynumberOptionalPenalty to reduce repeated tokens/codes. · Min: 0 · Default: 1.05
subtalker_dosamplebooleanOptionalSampling switch for the sub-talker. · Default: true
subtalker_temperaturenumberOptionalTemperature for sub-talker sampling. · Min: 0 · Max: 1 · Default: 0.9
speaker_voice_embedding_file_urlstringOptionalURL to a speaker embedding file in safetensors format, from `fal-ai/qwen-3-tts/clone-voice` endpoint. If provided, the TTS model will use the cloned voice for synthesis instead of the predefined voices.
02

Output Schema

FieldTypeDescription
idstringUnique identifier for the generation task
statusstringTask status: pending, running, completed, failed, timeout
modelstringModel used for the generation
outputsarrayArray of output items
outputs[].urlstringURL of the generated artifact
outputs[].content_typestringMIME type (e.g. image/png, video/mp4)
errorobject | nullError details if failed, null on success
error.typestringMachine-readable error type code
error.messagestringHuman-readable error description

Async Workflow

This model uses asynchronous execution. Submit a request and poll for the result.

  1. Submit — POST to /v1/run, receive an id
  2. Poll — GET /v1/run/{id} until status is completed, failed, or timeout
  3. Retrieve — Read outputs from the completed response
03

Code Examples

Ready-to-run snippets

# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "model": "alibaba/qwen-3-tts/1.7b",
  "text": "I am solving the equation: x = [-b ± √(b²-4ac)] / 2a? Nobody can — it's a disaster (◍•͈⌔•͈◍), very sad!",
  "top_k": 50,
  "top_p": 1,
  "voice": "Vivian",
  "prompt": "Very happy.",
  "language": "English",
  "temperature": 0.9,
  "max_new_tokens": 200,
  "reference_text": "Okay. Yeah. I resent you. I love you. I respect you. But you know what? You blew it! And it is all thanks to you.",
  "subtalker_top_k": 50,
  "subtalker_top_p": 1,
  "repetition_penalty": 1.05,
  "subtalker_dosample": true,
  "subtalker_temperature": 0.9,
  "speaker_voice_embedding_file_url": "https://static.sandbase.ai/examples/alibaba/qwen-3-tts/1.7b/output_url_0.safetensors"
}'

# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
  -H "Authorization: Bearer YOUR_API_KEY"