We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.

I agree

API - Trained Models

January 1, 2018

When the training of your model is completed, you can use the machine translation API to seamlessly integrate the model with your platform.

To start, send a POST request to:

https://api.staging.sinitic.ai/amt/model/<model_id>/inference and set a valid access token in X-SINITIC-TOKEN header. Learn more about Sinitic access tokens here.

To perform a correct POST request you'll need to obtain the model ID.

Choose a project in your Translate dashboard, after that click on "Translator" in the top right corner as shown in the video below, hover over the model you'd like to integrate and grab your model ID..

The POST request should be done with JSON body in the following format:

{
    "source": "intermediate",
    "texts": [
        "Hello!",
        "How are you?"
    ]
}'

 

Request body

Response body

The response body is a JSON array with results for each text in the input array.

{
    "results": [
        {
            "source_text": "Hello!",
            "target_text": "Hej!"
        },
        {
            "source_text": "how are you?",
            "target_text": "Hur mår du?"
        }
    ]
}

API - Trained Models
API - Trained Models
API - Trained Models