|
| 1 | +--- |
| 2 | +title: Documentation |
| 3 | +description: Get started with LibreTranslate, the free and open source translation API. |
| 4 | +template: doc |
| 5 | +--- |
| 6 | + |
| 7 | +import { LinkCard , Card, CardGrid } from '@astrojs/starlight/components'; |
| 8 | + |
| 9 | +LibreTranslate is a Free and Open Source Machine Translation API. Unlike other APIs, it doesn't rely on proprietary providers such as Google or Azure to perform translations. Instead, its translation engine is powered by the open source [Argos Translate](https://github.com/argosopentech/argos-translate) library. |
| 10 | + |
| 11 | + |
| 12 | +:::tip[Try it online!] |
| 13 | +Open [libretranslate.com](https://libretranslate.com) in your browser. |
| 14 | +::: |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +## Quickstart |
| 20 | + |
| 21 | +### Self-Hosted |
| 22 | + |
| 23 | +If you want to run LibreTranslate for free on your machine: |
| 24 | + |
| 25 | +```bash |
| 26 | +$ pip install libretranslate |
| 27 | +$ libretranslate |
| 28 | +$ curl -X POST http://localhost:5000/translate -d q="Hello" -d source=en -d target=es |
| 29 | +``` |
| 30 | + |
| 31 | +```json |
| 32 | +{"translatedText":"Hola"} |
| 33 | +``` |
| 34 | + |
| 35 | +See also the [installation](/guides/installation/) page. |
| 36 | + |
| 37 | +### Managed Hosting |
| 38 | + |
| 39 | +If you'd like an easier setup, high availability, fast translations and a professionally managed service for a small monthly cost: |
| 40 | + * Get an API key from: https://portal.libretranslate.com |
| 41 | + |
| 42 | +```bash |
| 43 | +$ curl -X POST https://libretranslate.com/translate -d q="Hello" -d source=en -d target=es -d api_key=xxxxx |
| 44 | +``` |
| 45 | + |
| 46 | +```json |
| 47 | +{"translatedText":"Hola"} |
| 48 | +``` |
| 49 | + |
| 50 | +Either way we're happy you're here! ❤ |
| 51 | + |
| 52 | +---- |
| 53 | + |
| 54 | +## Getting Started |
| 55 | + |
| 56 | +<CardGrid> |
| 57 | + <LinkCard title="Installation" |
| 58 | + href="/guides/example/" |
| 59 | + description="How to quickly get the software up and running on your machine." /> |
| 60 | + <LinkCard title="Basic Usage" |
| 61 | + href="/reference/example/" |
| 62 | + description="Start translating with step by step examples." /> |
| 63 | + <LinkCard title="Community Resources" |
| 64 | + href="/reference/example/" |
| 65 | + description="Questions? Find out where to get help." /> |
| 66 | + |
| 67 | + <LinkCard title="API Reference" |
| 68 | + href="/reference/example/" |
| 69 | + description="Browse the API specification" /> |
| 70 | + |
| 71 | +</CardGrid> |
| 72 | + |
| 73 | +## Contributing |
| 74 | + |
| 75 | +<CardGrid> |
| 76 | + |
| 77 | + <LinkCard title="Localization" |
| 78 | + href="/reference/example/" |
| 79 | + description="Learn how to translate these docs and the software in your language." /> |
| 80 | + |
| 81 | + <LinkCard title="Training New Language Models" |
| 82 | + href="/reference/example/" |
| 83 | + description="Learn how to train your own translation models." /> |
| 84 | + |
| 85 | + <LinkCard title="Support the Project" |
| 86 | + href="/reference/example/" |
| 87 | + description="Find out all the ways you can contribute." /> |
| 88 | + |
| 89 | + |
| 90 | +</CardGrid> |
0 commit comments