About


This is a frontend to No Language Left Behind (NLLB) models from Meta/Facebook. Please credit/cite the original work:

REST API

  • /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_Latn
    • tgt_lang -- target language ID, e.g., eng_Latn

HTTP Clients may send these parameters in three ways:

  1. Query parameters (GET)
    For example:

  2. 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
    
  3. 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"}'
    

System Info

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