PopNowAPI 文档
正文

Qwen-Audio 3.1 TTS Plus API 调用参考

可用自然语言指挥的富表现力旁白与品牌声音

用一个 PopNow API 密钥,就能在自己的代码里调用 Qwen-Audio 3.1 TTS Plus。下面列出要填的调用名、这个型号接受的每个输入字段、每次请求花多少美元(USD),以及一段可以直接粘进终端运行的请求。

参数说明直接取自型号的输入 schema,暂时只有英文。

一览

出品方
Alibaba
产出
音频
起价
$0.0285 USD 每 1000 字符

价格以 USD 显示,从你的 PopNow 余额扣款。任务受理时预留可能的最高费用,完成后按实际用量结算并释放余款;失败任务不收费。运行前可调用 POST /api/v1/jobs/quote 获取准确报价。

文字转语音

alibaba/qwen-audio-3.1-tts-plus/text-to-speech

价格

选项USD
默认$0.0285 每 1000 字符

参数

字段类型默认值取值范围作用
text必填string—最多 10000 个字符The words to speak. Billed per 1,000 characters. Turn on enable_ssml to use SSML tags.
voice_id可选stringlonganhuan_v3.1longanhuan_v3.1, longanlingxin_v3.1, xunanchuan_v3.1, longanfengyue_v3.1Preset voice for this model.
instructions可选string—最多 1000 个字符How to read the text: emotion, tone, persona, pace or dialect. Not spoken and not billed.
language可选stringautoauto, zh, en, ja, ko, fr, de, pt, it, vi, idReading language hint, or auto to detect it from the text.
speed可选number10.5 到 2Speaking speed from 0.5 to 2.
pitch可选number10.5 到 2Pitch from 0.5 to 2.
volume可选integer500 到 100Output volume from 0 to 100.
output_format可选stringmp3mp3, wav, pcm, opusAudio encoding. pcm is raw 16-bit audio without a file header.
sample_rate可选integer240008000, 12000, 16000, 22050, 24000, 44100, 48000Sample rate in Hz.
bitrate可选integer—32000, 64000, 96000, 128000, 192000, 256000Opus bit rate in bits per second. Only applies to opus.
enable_ssml可选booleanfalse—Read text as SSML markup.
seed可选integer—0 到 65535Random seed for controlled comparisons.

请求示例

这段请求原样就能运行,没写的字段都用默认值。运行前先把密钥放进环境变量 POPNOW_API_KEY。

POST /api/v1/jobs/createTask
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "alibaba/qwen-audio-3.1-tts-plus/text-to-speech",
  "input": {
    "text": "Hi there! This voice was created with the PopNow API in just a few seconds."
  }
}'

响应里会立刻带回 taskId。之后用 GET /api/v1/jobs/recordInfo 取结果,或者在请求里加上 callBackUrl 等通知。

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

接下来

本页内容