PopNowAPI 文件
主要內容

MiniMax Speech 2.8 HD API 呼叫參考

高傳真語音,400 多種音色,可控情緒

只要一把 PopNow API 金鑰,就能在自己的程式裡呼叫 MiniMax Speech 2.8 HD。以下列出要填的呼叫名稱、這個型號接受的每個輸入欄位、每次請求花多少點數,以及一段可以直接貼進終端機執行的請求。

參數說明直接取自型號的輸入 schema,目前只有英文。

總覽

開發商
MiniMax
產出
音訊
起價
18 點 每 1000 字元 ($0.18)
一般耗時
約 9 秒

1 點 = 0.01 美元。任務受理時會先保留可能的最高費用,完成後依實際用量結算、無條件進位到整點,多保留的會退回;失敗的任務不扣點數。想在執行前知道確切數字,請先呼叫 POST /api/v1/jobs/quote。

文字轉語音

minimax/speech-2.8-hd/text-to-speech

價格

選項點數 (每 1000 字元)美元
預設18$0.18

參數

欄位型別預設值可用值用途
text必填string—最多 5000 個字元The words to be spoken, exactly as written. Sound tags such as (sighs) or (laughs) are performed. Billed per 1,000 characters.
voice_id選填stringCalm_WomanWise_Woman, Friendly_Person, Inspirational_girl, Deep_Voice_Man, Calm_Woman, Casual_Guy, Lively_Girl, Patient_Man, Young_Knight, Determined_Man, Lovely_Girl, Decent_Boy, Imposing_Manner, Elegant_Man, … (+458)System voice. The label shows the voice name and, where known, the language it is built for.
emotion選填stringneutralneutral, happy, sad, angry, fearful, disgusted, surprisedEmotion of the reading.
speed選填number10.5 到 2Speaking rate; 1 is the voice's normal pace.
pitch選填integer0-12 到 12Pitch shift in semitones; 0 keeps the voice's own pitch.
volume選填number10.1 到 10Loudness multiplier; 1 is the normal level.
language選填stringautoauto, zh, yue, en, ar, ru, es, fr, pt, de, tr, nl, uk, vi, … (+27)Language hint that improves pronunciation; auto detects it from the text.
output_format選填stringmp3mp3, wav, flac, pcmFile format of the result; pcm is headerless 16-bit little-endian samples.
sample_rate選填integer—8000, 16000, 22050, 24000, 32000, 44100Sample rate in Hz. The model uses 32000 when omitted.
bitrate選填integer—32000, 64000, 128000, 256000MP3 bitrate in bits per second; ignored for other formats. The model uses 128000 when omitted.
audio_channels選填string—mono, stereoMono or stereo output. Mono when omitted.
english_normalization選填booleanfalse—Read numbers, dates and abbreviations in English text the way a person would say them.
pronunciation_dict選填array<object>—最多 100 項Custom pronunciations: each alias in the text is read as its pronunciation.

請求範例

這段請求原樣就能執行,沒寫的欄位都用預設值。執行前請先把金鑰放進環境變數 POPNOW_API_KEY。

POST /api/v1/jobs/createTask?wait=60
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask?wait=60" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "minimax/speech-2.8-hd/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"

接下來

本頁內容