LibreTranslate — Self-Hosted Translation API with No Rate Limits
LibreTranslate is a self-hostable translation API powered by open-source Argos Translate models. No API keys, no rate limits, no data sent to third parties — a drop-in replacement for Google Translate when privacy matters.
What it is
LibreTranslate is a self-hosted machine translation API powered by open-source Argos Translate models. It provides a REST API for text translation between supported languages with no API keys, no rate limits, and no data sent to third parties. LibreTranslate is a privacy-focused, drop-in replacement for Google Translate API.
LibreTranslate is for developers and organizations who need machine translation without sending text to cloud translation services, whether for privacy, compliance, or cost reasons.
The project is actively maintained with regular releases and a growing user community. Documentation covers common use cases, and the open-source nature means you can inspect the source code, contribute fixes, and adapt the tool to your specific requirements.
How it saves time or tokens
Google Translate API and DeepL charge per character with usage limits. LibreTranslate is free after the initial server setup. For applications that translate high volumes of text (documentation localization, chat translation, content migration), the cost savings are significant. Running locally also eliminates network latency for translation requests.
How to use
- Deploy LibreTranslate via Docker.
- The API is available on port 5000 by default.
- Send POST requests to
/translatewith source text, source language, and target language.
Example
# Deploy via Docker
docker run -d --name libretranslate -p 5000:5000 libretranslate/libretranslate
# First run downloads language models (may take several minutes)
# Translate text
curl -X POST http://localhost:5000/translate \
-H 'Content-Type: application/json' \
-d '{"q": "Hello world", "source": "en", "target": "es"}'
# Response: {"translatedText": "Hola mundo"}
# List supported languages
curl http://localhost:5000/languages
Related on TokRepo
- AI Tools for Content -- Content translation and localization tools
- AI Tools for Self-Hosted -- Self-hosted application tools
Common pitfalls
- Language model downloads happen on first startup and can be several gigabytes. The container may appear unresponsive during this phase. Check logs with
docker logs libretranslate. - Translation quality varies by language pair. Common pairs (English-Spanish, English-French) are good. Rare pairs may produce lower quality. Test your specific language pair before relying on it.
- LibreTranslate defaults to allowing all origins for CORS. For production, restrict origins and consider adding API key authentication with the
--api-keysflag.
Before adopting this tool, evaluate whether it fits your team's existing workflow. Read the official documentation thoroughly, and start with a small proof-of-concept rather than a full migration. Community forums, GitHub issues, and Stack Overflow are valuable resources when you encounter edge cases not covered in the documentation.
Frequently Asked Questions
LibreTranslate supports 30+ languages including English, Spanish, French, German, Chinese, Japanese, Korean, Arabic, Russian, Portuguese, and many more. The full list depends on the installed Argos Translate models.
Google Translate generally produces higher quality translations, especially for complex sentences. LibreTranslate runs locally with no data sharing and no per-character costs. Quality is acceptable for most practical use cases.
Yes. LibreTranslate uses Argos Translate models, which can be trained on custom parallel corpora. You can add domain-specific models for specialized vocabulary.
The API translates one text block per request. For batch translation, send multiple requests. The self-hosted deployment has no rate limits, so you can parallelize as much as your hardware supports.
LibreTranslate runs on CPU. A machine with 4GB RAM and 2 CPU cores handles typical workloads. GPU acceleration is not required but can speed up translation for high-volume deployments.
Citations (3)
- LibreTranslate GitHub— LibreTranslate is a self-hosted translation API
- Argos Translate— Powered by Argos Translate open-source models
- LibreTranslate Website— REST API for machine translation
Related on TokRepo
Discussion
Related Assets
Hugging Face Tokenizers — Fast Text Tokenization for ML Pipelines
Hugging Face Tokenizers is a Rust-powered tokenization library with Python bindings that implements BPE, WordPiece, Unigram, and SentencePiece tokenizers with training and encoding speeds of gigabytes per second, used as the backbone for Transformers model tokenization.
Cleanlab — Find and Fix Label Errors in Any ML Dataset
Cleanlab is a data-centric AI Python library that automatically detects label errors, outliers, and data quality issues in classification and regression datasets, helping improve model accuracy by cleaning training data rather than tuning models.
Hugging Face Datasets — Access and Process ML Datasets at Scale
Hugging Face Datasets is a Python library for efficiently loading, processing, and sharing machine learning datasets with Apache Arrow-backed memory mapping, streaming support, and access to thousands of community datasets on the Hub.