Documentation

1. Get The API Key

Log In to your http://Custom.MT account and create an API Key. In order to do that select Translation tab and then go to Credentials tab. You will see the section called API Keys that will have no connections available, so you need to press Create New button. A new connection will be automatically created.

https://console.custom.mt/credentials/

2. Authentification

To authorize the user in the headers, add the token field from the Custom MT Console user's account.

curl -X GET \  {api_endpoint}/api-translation/{action} \   -H 'cache-control: no-cache' \   -H 'token: {user_token}'

api_endpoint https://console.custom.mt

action route of the requested action

user_token it is your API key

3. Translate Using Template List

Create Templates in the console following the guidelines from the article Templates .

https://console.custom.mt/templates/

4. Get a Template List

curl --location --request POST ' {api_endpoint}/translation/get-templates' \ --header 'token: {user_token}' \ --header 'Content-Type: application/json' \ --data-raw '{     "source_language": "en",     "target_language": "es" }'

As a result, we get:

[     {         "template_name": "test1"     },     {         "template_name": "test2"     } ]

5. Translate With Batch Request:

max batch number is 50 TUs

As a result, we get:

6. Errors or warnings

If base model not available you’ll get message in response: