---
title: Deploy LibreTranslate with AI on Blossom
url: "/deploy/libretranslate/"
canonical_url: https://blossom88.com/deploy/libretranslate/
markdown_url: https://blossom88.com/deploy/libretranslate.md
summary: Run a private translation API on Blossom and keep its language models and
  API keys on one Volume.
categories:
- deployment
- developer-tools
stack:
- Python
- Flask
- Argos Translate
- SQLite
---

# Deploy LibreTranslate with AI on Blossom

[LibreTranslate](https://libretranslate.com/) runs its own translation
models. Start with English and Spanish to try the API from your app.

## Ask Your Agent

> **Ask your AI agent:** Deploy a private LibreTranslate API on Blossom and help me translate a short sentence from English to Spanish.
>
> Follow this guide: https://blossom88.com/deploy/libretranslate/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and [choose a Location in your cloud account](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).

## Have Ready

Nothing is required beyond your Blossom account.

- **Languages you want to translate** (Later): Try English and Spanish first. The first start downloads the selected models.

## How It Runs

| Part | Role | Where |
|---|---|---|
| LibreTranslate | Serves translations with the local language models | Persistent Service |
| Volume | Holds the models and API key database | Mounted on the Persistent Service |

## Deploy LibreTranslate

Run the official image on port 5000 as a private Service. Mount a
Volume at `/home/libretranslate/.local` to keep the models and API
key database. Choose your languages before the first start.

<details class="optional-reading" markdown="1">
<summary>Notes for your agent</summary>

Use `LT_LOAD_ONLY=en,es` and enable API keys with
`LT_API_KEYS=true` and `LT_REQ_LIMIT=0`. Put
`LT_API_KEYS_DB_PATH` inside the Volume. Use `LT_DISABLE_WEB_UI=true`
for API-only access. Check `/languages` after the models finish
loading. See the [upstream options](https://docs.libretranslate.com/guides/installation/).

</details>

<details class="optional-reading" markdown="1">
<summary>Commands your agent runs</summary>

    blossom app_plan:preview --data libretranslate-plan.yml
    blossom service:create --data libretranslate-service.yml
    blossom environment:deploy --id environment-100 --follow
    blossom shell --service service-100

</details>

## Make Your First Translation

Create an API key and send “Hello, how are you?” to
[`/translate`](https://docs.libretranslate.com/guides/api_usage/) with
English as the source and Spanish as the target.

![Translate an English greeting with an API key.](/deploy/assets/images/libretranslate/first-authenticated-translation.webp)

> **Ask your AI agent:** Create a LibreTranslate API key and use it to translate a short English greeting into Spanish.

> Follow this guide: https://blossom88.com/deploy/libretranslate/



## Keep Your Models and Keys

Keep the same Volume when you replace the Container. Retry the translation
with the existing key to check that the models and credentials are ready.

![Get a translation with the same key after replacement.](/deploy/assets/images/libretranslate/translation-after-replacement.webp)

## What You Get

- A private translation API
- English and Spanish models ready to use
- An API key that works after you replace the Container

Tested on Blossom: The replacement Container used the same API key and the same model files to translate an English greeting.
