惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
U
Unit 42
博客园 - 三生石上(FineUI控件)
aimingoo的专栏
aimingoo的专栏
人人都是产品经理
人人都是产品经理
Apple Machine Learning Research
Apple Machine Learning Research
MongoDB | Blog
MongoDB | Blog
Microsoft Azure Blog
Microsoft Azure Blog
G
Google Developers Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
云风的 BLOG
云风的 BLOG
Jina AI
Jina AI
S
Schneier on Security
T
Threatpost
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
Spread Privacy
Spread Privacy
The Register - Security
The Register - Security
Google DeepMind News
Google DeepMind News
L
LINUX DO - 热门话题
T
Tenable Blog
M
MIT News - Artificial intelligence
Vercel News
Vercel News
C
CERT Recently Published Vulnerability Notes
A
Arctic Wolf
C
Cyber Attacks, Cyber Crime and Cyber Security
L
Lohrmann on Cybersecurity
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Hacker News
The Hacker News
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
P
Palo Alto Networks Blog
A
About on SuperTechFans
V
Visual Studio Blog
T
The Exploit Database - CXSecurity.com
Scott Helme
Scott Helme
D
Darknet – Hacking Tools, Hacker News & Cyber Security
K
Kaspersky official blog
MyScale Blog
MyScale Blog
月光博客
月光博客
P
Privacy & Cybersecurity Law Blog
H
Help Net Security
腾讯CDC
T
Tailwind CSS Blog
博客园_首页
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
博客园 - 【当耐特】

人生足迹 · 博客

沧元图 - 人生足迹 · 博客 Matrix 家庭聊天室 - 人生足迹 · 博客 BitMagent - 种子市场 - 人生足迹 · 博客 Follow - 人生足迹 · 博客 (美国)电影分级制度 - MPAA - 人生足迹 · 博客 【弃用】沉浸式翻译 - 人生足迹 · 博客 应用图标 SVG - 人生足迹 · 博客 飞牛私有云 - 人生足迹 · 博客 LocalSend - 人生足迹 · 博客 边水往事 - 人生足迹 · 博客 网站监控服务 - 人生足迹 · 博客 哪吒监控 - 人生足迹 · 博客 SwitchHosts - 人生足迹 · 博客 Immich - 人生足迹 · 博客 PhotoPrism - 人生足迹 · 博客 独角数卡 - 人生足迹 · 博客 异次元店铺系统 - 人生足迹 · 博客 WSL2 - 人生足迹 · 博客 获取网站 Favicon - 人生足迹 · 博客
DeepLX API - 人生足迹 · 博客
qyg2297248353 · 2024-09-19 · via 人生足迹 · 博客

强大的 DeepL 翻译 API,您可以将 DeepLX 集成到任何应用程序中。

官网

DeepL 官网

https://www.deepl.com/

DeepLX

https://deeplx.owo.network/https://github.com/OwO-Network/DeepLX

安装教程

由于 Deepl API 网络问题,我们建议您自备网络代理。

通过 Docker-Compose

https://github.com/QYG2297248353/appstore-1panel/tree/custom/apps/deeplxhttps://git.lifebus.top/Ms-Studio/appstore-1panel/src/branch/custom/apps/deeplx

通过 1Panel 安装

安装第三方应用商店:Docker 应用商店 - 1Panel 版本

完成安装

API 端点

/translate

终端 - 免费版

模拟 DeepL iOS 客户端以发起翻译请求。不限次数,但在一定时间内频繁请求会导致 429 错误。

请求方式:POST

请求头部

标题 描述 价值
Content-Type 请求主体的内容类型。 application/json
Authorization 保护您的 API 所用的访问令牌。 Bearer your_access_token

请注意,如果无法通过 Authorization ,您也可以使用 URL 参数代替。例如, /translate?token=your_access_token

请求参数

参数 类型 描述 所需
text string 要翻译的文本。 true
source_lang string 源文本的语言代码。 true
target_lang string 您想要翻译成的语言代码。 true

请求响应

{
  "alternatives": [
    "Did you hear about this?",
    "You've heard about this?",
    "You've heard of this?"
  ],
  "code": 200,
  "data": "Have you heard about this?",
  "id": 8356681003,
  "method": "Free",
  "source_lang": "ZH",
  "target_lang": "EN"
}

/v1/translate

终端 - 专业版

模拟 DeepL Pro 账号以发起翻译请求。无限制,这可能有效地避免 429 问题,但你需要提供 Pro 账号的 dl_session 参数,否则无法使用。

请求方式:POST

请求头部

标题 描述 价值
Content-Type 请求主体的内容类型。 application/json
Authorization 保护您的 API 所用的访问令牌。 Bearer your_access_token

请注意,如果无法通过 Authorization ,您也可以使用 URL 参数代替。例如, /translate?token=your_access_token

请求参数

参数 类型 描述 所需
text string 要翻译的文本。 true
source_lang string 源文本的语言代码。 true
target_lang string 您想要翻译成的语言代码。 true

请求响应

{
  "alternatives": [
    "Did you hear about this?",
    "You've heard about this?",
    "You've heard of this?"
  ],
  "code": 200,
  "data": "Have you heard about this?",
  "id": 8356681003,
  "method": "Pro",
  "source_lang": "ZH",
  "target_lang": "EN"
}

/v2/translate

终端 - 官方版

模拟 DeepL 官方 API 发起翻译请求。不限次数,但在一定时间内频繁请求会导致 429 错误。

请求方式:POST

请求头部

标题 描述 价值
Content-Type 请求主体的内容类型。 application/json
Authorization 保护您的 API 所用的访问令牌。 Authorization: DeepL-Auth-Key [yourAccessToken]

请注意,如果您想同时传递两个参数,请用空格将它们分隔开。

请求参数

参数 类型 描述 所需
text string 要翻译的文本。 true
source_lang string 源文本的语言代码。 true
target_lang string 您想要翻译成的语言代码。 true

请求响应

{
  "alternatives": [
    "Did you hear about this?",
    "You've heard about this?",
    "You've heard of this?"
  ],
  "code": 200,
  "data": "Have you heard about this?",
  "id": 8356681003,
  "method": "Pro",
  "source_lang": "ZH",
  "target_lang": "EN"
}

集成

沉浸式翻译

不建议您使用 DeepLX 服务进行沉浸式翻译。这是因为沉浸式翻译会在短时间内发起大量请求,可能导致您的 IP 被 DeepL 封锁。

https://blog.lifebus.top/archives/a3a88e94-8add-4401-ac88-b8f935707857

cURL

可快速测试 API 是否正常,或临时使用。

curl -X POST http://localhost:1188/translate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_access_token" \
-d '{
    "text": "Hello, world!",
    "source_lang": "EN",
    "target_lang": "DE"
}'