请求参数
| 参数 | 必填 | 说明 |
|---|---|---|
pace | 否 | Rhythm of the reading. Omit it to keep the voice's own rhythm. natural · rapid_fire · the_drift · staccato |
text | 否 | The words to be spoken, exactly as written. Spell out sounds such as sighs or laughter; bracketed cues may be read aloud. |
scene | 否 | Where and to whom the words are spoken. Shapes the delivery and is not spoken. |
style | 否 | 预设的风格或曲风。 whisper · empathetic · vocal_smile · newscaster · promo_hype · deadpan |
accent | 否 | English accent used for the reading. neutral · american_general · american_valley · american_south · british_rp · british_brixton · transatlantic · australian |
dialogue | 否 | A scripted conversation, used instead of text: each line names a speaker from speakers. |
speakers | 否 | The cast for dialogue: one or two voices, each with a name the lines refer to. |
voice_id | 否 | 从可用音色里挑一个。 Achernar · Achird · Algenib · Algieba · Alnilam · Aoede · Autonoe · Callirrhoe · Charon · Despina · Enceladus · Erinome · Fenrir · Gacrux · Iapetus · Kore · Laomedeia · Leda · Orus · Puck · Pulcherrima · Rasalgethi · Sadachbia · Sadaltager · Schedar · Sulafat · Umbriel · Vindemiatrix · Zephyr · Zubenelgenubi · 默认值: Kore |
temperature | 否 | Variation between takes; higher is less predictable. ≥ 0 · ≤ 2 |
instructions | 否 | How to read the text: mood, distance from the microphone, who is listening. Shapes the delivery and is not spoken. |
价格
价格以积分计,和网站上用的是同一种积分(1 积分 = $0.01)。任务受理时先冻结积分,完成后按实际费用结算;失败的任务会退还。
| 选项 | 积分 /秒 | ≈ 美元 |
|---|---|---|
| 标准 | 0.03 | US$0.0003 |
想在运行前知道确切金额,把同样的请求体发到 POST /jobs/quote 即可。
API 快速上手
三步调用 Gemini 3.8 Flash-Lite TTS API
- 创建 API 密钥. 登录 PopNow,在 API 控制台创建密钥。密钥以 sk-popnow- 开头,和网站共用同一份积分。
- 发送请求. 向 POST /jobs/createTask 发请求,model 填 google/gemini-3.8-flash-lite-tts/text-to-speech,input 按参数表填写。响应会立刻返回任务 ID。
- 取回结果. 用任务 ID 轮询 GET /jobs/recordInfo,或者传 callBackUrl,结果会推送到这个地址。任务成功后下载输出链接。
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
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: $IDEMPOTENCY_KEY" \
-d '{
"model": "google/gemini-3.8-flash-lite-tts/text-to-speech",
"input": {
"text": "Welcome back. Your files finished rendering a minute ago and are ready to download.",
"voice_id": "Kore"
}
}'
# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $POPNOW_API_KEY"请把提示词和链接换成你自己的。API 页签里有响应、轮询和回调的参考。
Gemini 3.8 Flash-Lite TTS API 常见问题
Gemini 3.8 Flash-Lite TTS API 怎么收费?
Gemini 3.8 Flash-Lite TTS:0.03 积分(US$0.0003)/秒。积分和网站通用(1 积分 = $0.01),新账号赠送 30 积分,失败的任务会退还。
Gemini 3.8 Flash-Lite TTS 在 API 里的调用名是什么?
在 POST /jobs/createTask 的 model 字段里填 文字转语音用 google/gemini-3.8-flash-lite-tts/text-to-speech。
Gemini 3.8 Flash-Lite TTS API 有哪些限制?
文本长度(字符):5,000;音色:30。超出这些限制的请求会在扣费之前被拒绝。
不写代码能试 Gemini 3.8 Flash-Lite TTS 吗?
可以。Playground 用你的 PopNow 积分运行 Gemini 3.8 Flash-Lite TTS,不需要 API 密钥,每次运行都会给出对应的代码。


