workflowstacks
ai-agent

LibreTranslate

Free and Open Source Machine Translation API. Self-hosted, offline capable and easy to setup.
16,008 stars1,652 forksPythonUpdated 8/10/2026100% free · open source
What it does

LibreTranslate is a self-hosted, open-source machine translation API that allows you to translate text from one language to another without relying on external services.

Install / run
docker run -d -p 5000:5000 libtranslate/libretranslate
When to use it
  • When you need to integrate machine translation into your application without paying for a third-party API
  • When you want to keep your translation data private and secure
  • When you need to support languages that are not well-supported by commercial translation APIs
Quick start
  1. 1Pull the LibreTranslate Docker image: docker pull libtranslate/libretranslate
  2. 2Run the container: docker run -d -p 5000:5000 libtranslate/libretranslate
  3. 3Test the API: curl -X POST 'http://localhost:5000/translate' -H 'Content-Type: application/json' -d '{"q":"Hello, world!","source":"en","target":"es"}'
  4. 4Configure the API: edit the config.json file to change settings such as the port number or logging level
  5. 5Integrate with your application: use the LibreTranslate API endpoint to send translation requests from your application
Ready-to-paste prompt
curl -X POST 'http://localhost:5000/translate' -H 'Content-Type: application/json' -d '{"q":"This is a test sentence.","source":"en","target":"fr"}'
Heads up: You need to have Docker installed and running on your system to use LibreTranslate, and you should be aware that the initial download of the model data may take some time due to its large size.
Saves to your device

Topics

api
machine
translate
translation
translator
How LibreTranslate works
Codeflow
Free to inspect

LibreTranslate is a medium Python project (~11k lines across 34 code files, plus 10 test files). Setup is light: installs like a normal app. Reading the code is optional. Last commit this month, AGPL-3.0 license, has a test suite.

Size
Medium codebase
~11k lines · 34 code files · ~1 h to skim
Setup
One-command install
Installs like a normal app. Reading the code is optional.
Runs on
Python · Docker
No API keys detected
Python 74%HTML 11%Dockerfile 6%CSS 6%Shell 3%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    AGENTS.md
    The instructions the AI actually follows
  3. 3
    main.py
    Where the program starts running
  4. 4
    pyproject.toml
    Dependencies and the commands it exposes
  5. 5
    libretranslate/__init__.py
    Inside libretranslate/ — the main logic begins here
What's in each folder
libretranslate/Core code — the actual logic173 files
scripts/Helper scripts8 files
docker/Deployment / infrastructure5 files
db/Folder1 files
.github/CI / automation (GitHub Actions)6 files
.well-known/Tool / agent settings1 files
READMEHas testsDocumentedCI checksDocker readyAGPL-3.0 licenseUpdated this month
Quick Actions
Details
Creator
LibreTranslate
Language
Python
Category
ai-agent
Published
12/19/2020

Are you the creator of this tool? Claim your listing → and earn 85% of every sale.