模型 API 接入文件
ElevenLabs Turbo 2.5 API 接入文件
透過 Rivya Public API v1 呼叫 ElevenLabs Turbo 2.5,包含模型 ID elevenlabs-turbo-2-5、輸入類型、參數、Files API 規則、點數和回應範例。
API 可呼叫文字輸入可用音訊
API 模型 ID
elevenlabs-turbo-2-5
輸入類型
text
Files API
最小請求不需要
基礎點數
6
能力類型
音訊
計費方式
METERED
Prompt 上限
5000 字元
請求欄位
模型 ID 放在頂層欄位。模型專屬控制項放入 params。
| Key | 類型 | 必填 | 預設值 | 說明 |
|---|---|---|---|---|
| model | string | 是 | elevenlabs-turbo-2-5 | 使用 elevenlabs-turbo-2-5 作為 API 模型 ID。 |
| prompt | string | 是 | - | 這個模型最多 5000 個字元。 |
| params | object | 是 | - | 模型專屬參數物件。可用 keys 請見下方參數表。 |
| client_request_id | string | 否 | - | 可選的用戶端請求 ID,方便你在自己的系統中追蹤請求。 |
模型參數
| Key | 類型 | 必填 | 預設值 | 範圍 | 選項 | 說明 |
|---|---|---|---|---|---|---|
| voice | select | 是 | TX3LPaxmHKxFdv7VOQHJ | - | TX3LPaxmHKxFdv7VOQHJ, cgSgspJ2msm6clMCkdW9, pNInz6obpgDQGcFmaJgB, BIvP0GN1cAtSRTxNHnWS, aMSt68OGf4xUZAnLpTU8 | 語音 |
| stability | number | 否 | 0.5 | min 0 / max 1 / step 0.05 | - | 穩定性 |
| similarity_boost | number | 否 | 0.75 | min 0 / max 1 / step 0.05 | - | 相似度提升 |
| style | number | 否 | 0 | min 0 / max 1 / step 0.05 | - | 風格 |
| speed | number | 否 | 1 | min 0.7 / max 1.2 / step 0.05 | - | 速度 |
| timestamps | select | 否 | false | - | false, true | 時間戳記 |
| previous_text | text | 否 | - | - | - | 前文 |
| next_text | text | 否 | - | - | - | 後文 |
| language_code | text | 否 | - | - | - | 語言代碼 |
最小請求
{
"model": "elevenlabs-turbo-2-5",
"prompt": "A polished audio concept for a short product story",
"params": {
"voice": "TX3LPaxmHKxFdv7VOQHJ",
"stability": 0.5,
"similarity_boost": 0.75,
"style": 0,
"speed": 1,
"timestamps": "false",
"previous_text": "可選:上一段上下文",
"next_text": "可選:下一段上下文",
"language_code": "可選:如 en 或 zh"
}
}建立回應
建立 endpoint 會回傳公開 task id。繼續輪詢狀態 endpoint,直到任務成功或失敗。
{
"id": "task_elevenlabs_turbo_2_5_example",
"status": "queued",
"model": "elevenlabs-turbo-2-5",
"reserved_credits": 6,
"final_credits": 0,
"created_at": "2026-05-11T00:00:00.000Z",
"updated_at": "2026-05-11T00:00:00.000Z",
"result": null,
"error": null
}常見錯誤
validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found
建立 endpoint 會回傳公開 task id。繼續輪詢狀態 endpoint,直到任務成功或失敗。