View on GitHub

ModernMT Enterprise Edition

Neural Adaptive Machine Translation for professional translators

← Back to Home

API Translate

Quick Example

curl -X GET \
   -H 'MMT-ApiKey: <your_api_key>' \
  '' \
   | python -mjson.tool

    "data": {
        "contextVector": {
            "entries": [
                {"memory": {"id": 1, "name": "europarl"}, "score": 0.20658109},
                {"memory": {"id": 2, "name": "ibm"}, "score": 0.0017772929}
        "translation": "Ciao"
    "status": 200


This method returns the translation of the provided text. The text is XML encoded and can contain XML Tags. Since one ModernMT Engine may supports multiple language pairs and directions, you need to specify the source and target languages.

Resource URL


source The language tag of the source language.

Example: en
target The language tag of the target language.

Example: it
The text to translate in XML format (XML tags accepted, text must be XML-encoded).

Example: This is an example
The context vector to use in the translation, as a series of comma-separated key-value pairs `id1:score1,id2:score2,...`.

Example: Example: 1:0.34,3:0.045
A list containing the Memories to use for this translation.

Example: 10
The type of translation request. It can be either interactive or batch. Default value is interactive.


translation The translation of the input sentence.
contextVector The Context Vector object calculated by analyzing the context text provided. For more details on the object format, please have a look at <a href=/apis/>API Get Context Vector.

← Back to Home