陪讀蛙

DeepL

了解如何在陪讀蛙中設定官方 DeepL API,包括 Free / Pro 密鑰的自動識別、需要填寫的欄位以及常見問題排查。

什麼是 DeepL?

DeepL 是 DeepL 官方提供的付費翻譯 API。在陪讀蛙中,它與 DeepLX 是分開的:

  • DeepL 使用 DeepL 官方 API,需要有效的 DeepL API Key。
  • DeepLX 是非官方的類別 DeepL API,支援自訂 Base URL。

如果您想使用官方 DeepL 服務,請在 API Providers 頁面選擇 DeepL

陪讀蛙如何配置 DeepL

陪讀蛙中的 DeepL 配置非常簡單:

  • API Key:必填
  • Base URL:不會顯示,也不可配置

陪讀蛙會根據您的 API Key 自動選擇正確的 DeepL 端點:

  • :fx 結尾的密鑰使用 https://api-free.deepl.com
  • 其他密鑰使用 https://api.deepl.com

您不需要手動區分 Free 和 Pro 端點。

在陪讀蛙設定 DeepL

  1. 打開陪讀蛙擴充的選項頁。
  2. 進入 API Providers
  3. 選擇 Official DeepL API
  4. API Key 欄位中貼上您的 DeepL API Key。
  5. 測試一次翻譯。

就這些。不需要填寫 Base URL。

DeepL Free 與 Pro 密鑰

陪讀蛙會透過 API Key 的格式決定要請求哪一個 DeepL 端點。

DeepL Free

如果您的金鑰以 :fx 結尾,陪讀蛙會傳送請求給下列位址:

https://api-free.deepl.com/v2/translate

DeepL Pro

如果您的金鑰不以 :fx 結尾,陪讀蛙會傳送請求給下列位址:

https://api.deepl.com/v2/translate

語言程式碼處理

陪讀蛙會自動對部分語言程式碼做適配:

  • 目標語言 zh 會轉換為 ZH-HANS
  • 目標語言 zh-TW 會轉換為 ZH-HANT
  • 來源語言 zh-TW 會規範化為 ZH
  • 當來源語言設定為 auto 時,陪讀蛙會讓 DeepL 自動偵測

常見問題排除

“DeepL API key is not configured”

說明 API Key 為空。請先在提供者設定中填寫有效的 DeepL API Key。

“DeepL translation request failed”

通常表示以下情況之一:

  • API Key 無效
  • API Key 類型與您的 DeepL 套餐不符
  • DeepL 服務拒絕了該請求

Free 金鑰無法使用

請確認您的 DeepL Free 密鑰仍然以 :fx 結尾。陪讀蛙依賴這個字尾來選擇 Free API 端點。

何時選擇 DeepL,何時選擇 DeepLX

如果您需要以下能力,請選擇 DeepL

  • 官方 DeepL API
  • 自動處理 Free / Pro 端點
  • 只填寫 API Key 的簡單配置

如果您需要以下能力,請選擇 DeepLX

  • 自訂或自架 DeepLX 供應商
  • 自訂 Base URL 模式
  • 在 URL 中使用 {{apiKey}} 佔位符

On this page