Text Analysis — entry 010 of 14
LibreTranslate
LibreTranslate is the open-source machine-translation engine's hosted API, translating text across dozens of languages without routing data through a third-party cloud vendor. The public libretranslate.com instance now requires an API key issued through its billing portal, with a free tier plus metered paid plans for higher volume.
LibreTranslate is an open-source machine-translation engine. The hosted instance at libretranslate.com needs an API key to translate text, but three support endpoints answer with no key: the language list, a health check, and the frontend settings, which show the character limit.
AuthenticationAPI KeySign up with the provider to obtain credentials.
HTTPSSupportedTraffic is encrypted in transit.
CORSEnabledCallable directly from browser JavaScript.
PricingFreemiumA usable free tier exists, with paid plans for more volume.
FormatsJSONResponses can be requested as JSON.
GreatAPIs Score
Score81
Authentication15/25API key required
Pricing17/20Freemium tier available
Docs20/20Machine-readable spec file bundled
Formats9/15Single response format
Freshness20/20Verified within 6 months
Auth quickstart
POST /translateandPOST /detectneed a key. A livePOST /translatethis run with no key returnedHTTP 400:{"error":"Visit https://portal.libretranslate.com to get an API key"}. A livePOST /detectwith no key returned the sameHTTP 400and error body.GET /languages,GET /health, andGET /frontend/settingsneed no key. Live calls this run to all three returnedHTTP 200with no credential sent.- Get a key at portal.libretranslate.com, then send it as
api_keyin the JSON body of a/translateor/detectcall. LibreTranslate's own docs put the key in the body, not in a header. - Self-hosting removes the key requirement. LibreTranslate's own docs (docs.libretranslate.com/guides/manage_api_keys) say a self-hosted instance passes
api_keyonly for a higher rate-limit quota, and that self-hosting needs the--api-keysflag before a key does anything at all. libretranslate.com is different: its docs say plainly, "If you need an API Key for libretranslate.com, you need to purchase it from here." The key gate is a policy of the hosted instance, not a limit of the open-source engine.
Stored keyNo key stored
Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.
Endpoints
misc3
GET/frontend/settingsRetrieve Frontend Settings
Responses
| Status | Description | Schema |
|---|---|---|
200 | frontend settings | frontend-settings |
GET/healthHealth Check
Responses
| Status | Description | Schema |
|---|---|---|
200 | Service is healthy | health-response |
POST/suggestSubmit a Suggestion to Improve a Translation
Responses
| Status | Description | Schema |
|---|---|---|
200 | Success | suggest-response |
403 | Not authorized | error-response |
translate4
POST/detectDetect Language of Text
Responses
| Status | Description | Schema |
|---|---|---|
200 | Detections | detections |
400 | Invalid request | error-response |
403 | Banned | error-response |
429 | Slow down | error-slow-down |
500 | Detection error | error-response |
GET/languagesGet Supported Languages
Responses
| Status | Description | Schema |
|---|---|---|
200 | List of supported languages | languages |
POST/translateTranslate Text
Responses
| Status | Description | Schema |
|---|---|---|
200 | Translation | translate |
400 | Invalid request | error-response |
403 | Banned | error-response |
429 | Slow down | error-slow-down |
500 | Translation error | error-response |
POST/translate_fileTranslate a File
Responses
| Status | Description | Schema |
|---|---|---|
200 | Translated file | translate-file |
400 | Invalid request | error-response |
403 | Banned | error-response |
429 | Slow down | error-slow-down |
500 | Translation error | error-response |
Try it
Developer reference
Base URL
https://libretranslate.comKey endpoints
- GET/languages
- GET/health
- POST/translate
- POST/detect
Gotchas & limits
- A missing key returns
400, not401. A livePOST /translateandPOST /detectthis run each returnedHTTP 400 {"error":"Visit https://portal.libretranslate.com to get an API key"}rather than a401 Unauthorized. Check the status text, not just the code, when you handle the error. - The key goes in the JSON body as
api_key, not in a header. LibreTranslate's own docs (docs.libretranslate.com) showapi_keyas aPOSTbody field alongsideq,source, andtarget. - The character limit for translation is 2000, confirmed live this run from
GET /frontend/settings("charLimit":2000). The same endpoint confirms"keyRequired":truefor the hosted instance. - CORS is wide open on every endpoint tested. A live
GET /languagesthis run returnedaccess-control-allow-origin: *, so a browser page can call it directly with no server proxy. en's own target list includesen. A liveGET /languagesthis run showed English'stargetsarray listingenalongside every other language code, so a same-language "translation" is a valid call, not an error case to guard against.
Changelog
- gained a docs link