請求參數
| 參數 | 必填 | 說明 |
|---|---|---|
text | 是 | The words to be spoken, exactly as written. Billed per 1,000 characters. |
pitch | 否 | Pitch shift in semitones; 0 keeps the voice's own pitch. ≥ -12 · ≤ 12 · 預設值: 0 |
speed | 否 | 語速。 ≥ 0.5 · ≤ 2 · 預設值: 1 |
volume | 否 | Loudness multiplier; 1 is the normal level. ≥ 0.5 · ≤ 2 · 預設值: 1 |
language | 否 | 朗讀的語言。 zh · en · ja · es-mx · id · pt-br · ko · it · de · fr |
voice_id | 否 | 從可用的聲音中挑一個。 vivi_mixed_en_zh_ja_es_id · mindy_en_es_id_pt_zh · stokie_en · dacey_en · tim_en · kian_en_zh · cedric_en_zh · sophie_en_zh · jean_en_zh · magnus_en_zh · mabel_en_zh · nadia_en_zh · opal_en_zh · pearl_en_zh · quentin_en_zh · vienna_mixed_en_zh · alina_mixed_en_zh · corinne_mixed_en_zh · esther_mixed_en_zh · freya_mixed_en_zh · gigi_mixed_en_zh · holly_mixed_en_zh · lyla_mixed_en_zh · daisy_mixed_en_zh · tracy_es_zh · jess_ja_es_id_pt_en_zh · pinky_es_ko_mixed_en_zh · sweety_ja_es · sandy_es_mixed_en_zh · sven_de · minimi_ja · usseau_fr · felipe_es · han_id · martins_pt · enzo_it · shane_ko · bonnie_zh · felix_zh · celeste_zh · monkey_king_zh · 預設值: stokie_en |
sample_rate | 否 | Sample rate in Hz. The model uses 24000 when omitted. 8000–48000 |
instructions | 否 | How to read the text: tone, emotion, pace or volume. Not spoken and not billed. |
output_format | 否 | 結果的檔案格式。 mp3 · opus · 預設值: mp3 |
價格
價格以點數計,和網站上用的是同一種點數(1 點 = $0.01)。任務受理時先凍結點數,完成後依實際費用結算;失敗的任務會退還。
| 選項 | 點數 /1,000 字元 | ≈ 美元 |
|---|---|---|
| 標準 | 10.8 | US$0.11 |
每個任務會無條件進位到整數點數,所以最低檔跑一次是 11 點數/1,000 字元(US$0.11)。
想在執行前知道確切金額,把相同的請求內容送到 POST /jobs/quote 即可。
API 快速上手
三步驟呼叫 Seed Speech 2.0 API
- 建立 API 金鑰. 登入 PopNow,在 API 主控台建立金鑰。金鑰以 sk-popnow- 開頭,和網站共用同一份點數。
- 送出請求. 對 POST /jobs/createTask 送出請求,model 填 bytedance/seed-speech-2.0/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": "bytedance/seed-speech-2.0/text-to-speech",
"input": {
"text": "Welcome back. Your files finished rendering a minute ago and are ready to download.",
"voice_id": "stokie_en",
"output_format": "mp3"
}
}'
# 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 頁籤裡有回應、輪詢和回呼的參考。
Seed Speech 2.0 API 常見問題
Seed Speech 2.0 API 怎麼收費?
Seed Speech 2.0:11 點數(US$0.11)/1,000 字元。點數和網站通用(1 點數 = $0.01),新帳號贈送 30 點數,失敗的任務會退還。
Seed Speech 2.0 在 API 裡的模型名稱是什麼?
在 POST /jobs/createTask 的 model 欄位填 文字轉語音用 bytedance/seed-speech-2.0/text-to-speech。
Seed Speech 2.0 API 有哪些限制?
文字長度(字元):5,000;聲音:41;語言:10。超出這些限制的請求會在扣款之前被拒絕。
不寫程式能試 Seed Speech 2.0 嗎?
可以。Playground 用你的 PopNow 點數執行 Seed Speech 2.0,不需要 API 金鑰,每次執行都會附上對應的程式碼。

