LibreTranslate
支持 17 种语言的翻译工具
- 认证方式
- No auth
- HTTPS
- Yes
- CORS
- Unknown
- 分类
- 文本分析
- 文档 / URL
- https://libretranslate.com/docs
简介
LibreTranslate 是开源机器翻译 API(基于 Argos Translate)——Google Translate 的隐私友好替代品。该项目设计为可自建:你可以免费、永久运行自己的实例。
⚠️ 状态(2026-08 实测):libretranslate.com 公共实例现在需要 API 密钥(POST /translate 返回
400: Visit https://portal.libretranslate.com to get an API key)。免费无限制的路径是自建——这本来就是该项目的设计模式。
快速开始
在自建实例上(或使用门户密钥):
curl -X POST "http://localhost:5000/translate" \
-H "Content-Type: application/json" \
-d '{"q": "Hello world", "source": "en", "target": "es"}'
{"translatedText": "Hola mundo"}
语言检测:
curl -X POST "http://localhost:5000/detect" \
-H "Content-Type: application/json" \
-d '{"q": "Hola mundo"}'
支持的语言列表:
curl "http://localhost:5000/languages"
认证方式
- 公共实例:需要(免费)API 密钥,从 portal.libretranslate.com 获取。
- 自建实例:默认无需认证(如需密钥可在配置中启用
api_keys)。
速率限制与注意事项
- 公共实例有限流;自建完全无限制。
- 支持 130+ 语言;翻译质量因语言对而异(Argos 模型)。
- Docker 一行部署:
docker run -p 5000:5000 libretranslate/libretranslate。 - 隐私友好:自建意味着你的文本永远不会离开你的服务器。
常见问题
LibreTranslate 免费吗? 软件免费开源。公共实例现在需要免费密钥;自建永久免费。
需要密钥吗? 公共实例需要;自建实例默认不需要。
如何自建?
docker run -p 5000:5000 libretranslate/libretranslate——然后用 localhost:5000。
文本分析 分类更多
| API | Auth | HTTPS | CORS | |
|---|---|---|---|---|
| apilayer languagelayer Language Detection JSON API supporting 173 languages | OAuth | Yes | Unknown | ↗ |
| Audexum Text-to-speech REST API with 43 voices and 33 languages | API Key | Yes | Yes | ↗ |
| Aylien Text Analysis A collection of information retrieval and natural language APIs | API Key | Yes | Unknown | ↗ |
| Cloudmersive Natural Language Processing Natural language processing and text analysis | API Key | Yes | Yes | ↗ |
| Code Detection Detect, label, format and enrich the code in your app or in your data pipeline | OAuth | Yes | Unknown | ↗ |