canonical: https://jentic.com/apis/libretranslate.com/libretranslate

# LibreTranslate API

The LibreTranslate API translates text and files between languages, detects the source language of a passage, and lists the language pairs a given instance supports. It is free and open source, self-hostable, and reachable through public instances, and it accepts translation suggestions that can feed back into its models.

## For AI agents

Translate text and files between languages, detect a passage's language, and list the language pairs an instance supports.

## Scope

Does not synthesize speech, transcribe audio, or manage translation memories for teams. Use for machine translation and language detection only.

## Capabilities

- Translate text between supported source and target languages
- Translate an uploaded file and return the translated document
- Detect the language of a passage of text
- List the language pairs a given instance supports
- Submit a translation suggestion to improve future results

## Use cases

### Agent-driven translation through Jentic

An AI agent handling multilingual input can detect a message's language and translate it into the user's language before responding. Through Jentic the agent finds the detect and translate operations by intent and loads their schemas, so translation happens inline without wiring the LibreTranslate endpoints.

Example prompt: Search Jentic for 'translate text', detect the source language of a message, then translate it into English.

### Batch document translation

Translate uploaded documents into a target language and return the translated file. LibreTranslate handles the file translation server-side, so an agent can localize a set of documents without extracting and re-inserting text by hand.

Example prompt: Upload a document and translate it into Spanish, then save the returned translated file.

### Language coverage check before routing

List the language pairs a given instance supports before routing a translation request, so an agent can fall back gracefully when a pair is unavailable. The supported-languages list reflects the models loaded on that instance.

Example prompt: List the supported languages for the instance and confirm the target language is available before translating.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/translate` | Translate text |
| POST | `/detect` | Detect language |
| GET | `/languages` | Get supported languages |
| POST | `/translate_file` | Translate a file |
| POST | `/suggest` | Submit a translation suggestion |

## Key resources

- **Translations** — Text and file translations between language pairs
- **Languages** — The language pairs a given instance supports

## Why Jentic

- **Setup:** Wiring LibreTranslate by hand means picking an instance, deciding whether a key is needed, and handling both text and file translation flows yourself. Through Jentic you install once, import LibreTranslate from the API Directory, store any key once, and your agent calls it.
- **Permission scoping:** LibreTranslate carries the text and target language in the request body, so rules bound which operations your agent may call, not which languages. You choose the operations it may call, such as translate and detect, so submitting suggestions is not included unless you add it.
- **Credential handling:** Your LibreTranslate API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'translate text' or 'detect a language', and Jentic returns the matching LibreTranslate operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Microsoft Translator** — Cloud translation across many languages
- **Detect Language** — Standalone language detection service
- **LanguageTool** — Grammar and style checking across languages

## FAQ

### What authentication does the LibreTranslate API use?

The LibreTranslate API takes an optional API key per its OpenAPI spec, passed as the api_key query parameter. Public instances may run without a key, while some instances and higher rate tiers ask for one. Through Jentic the key is stored encrypted by your own Jentic One instance and injected at request time.

### Is there a LibreTranslate API MCP server?

You don't need an MCP server to give your agent the LibreTranslate API. Jentic connects it directly from the API Directory: import it, store your credential once, and your agent calls it on demand without loading another server's tool definitions into its context.

### Can I detect a language with the LibreTranslate API?

Yes. The detect operation returns the most likely source language for a passage of text, which you can pass into the translate operation as the source language or use to route the request.

### What are the rate limits for the LibreTranslate API?

Rate limits depend on the instance and are not fixed in the OpenAPI spec; the public instance may rate-limit or require a key. Check the LibreTranslate documentation at https://libretranslate.com for the limits on the instance you use.

### Can I limit what my agent is allowed to do with the LibreTranslate API?

Yes. LibreTranslate carries the text and target language in the request body, so rules bound which operations your agent may call. Allow only the translate and detect operations, so the agent can localize text but cannot submit translation suggestions unless you add that operation.

### How do I translate text with the LibreTranslate API through Jentic?

Search Jentic for 'translate text', load the translate operation, and pass the text with source and target languages. Jentic injects the key when the instance needs one. To run it on your own infrastructure, install Jentic One from its GitHub repo.
