/translate end point accepts GET and POST requests with the following args:source -- source text. Can be a single string or a batch (i.e., list of strings)src_lang -- source language ID, e.g., eng_Latntgt_lang -- target language ID, e.g., eng_LatnHTTP Clients may send these parameters in three ways:
Query parameters (GET)
For example:
URL encoded form (POST)
$ curl --data "source=Comment allez-vous?" --data "source=Bonne journée" \
--data "src_lang=fra_Latn" --data "tgt_lang=eng_Latn" \
http://localhost:6060/translate
JSON body (POST)
$ curl -H "Content-Type: application/json" -X POST \
http://localhost:6060/translate \
--data '{"source": ["Comment allez-vous?"], "src_lang": "fra_Latn", "tgt_lang": "kan_Knda"}'
| transformer | 4.36.2 |
|---|---|
| Python Version | 3.10.12 (main, Jan 8 2026, 06:52:19) [GCC 11.4.0] |
| Platform | Linux-6.8.0-1040-aws-x86_64-with-glibc2.35 |
| Platform Version | #42~22.04.1-Ubuntu SMP Wed Sep 24 10:26:57 UTC 2025 |
| Processor | |
| GPU | [unavailable] |
| model_id | facebook/nllb-200-distilled-600M |