Swagger
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.
Copy the text in the Key column, you will need this API Key in the following steps to enable the connection.
The next step is to go to Custom MT API and enable API connection. To do so open the link https://console.custom.mt/swagger/ and select Authorize button.
Paste the API Key copied at Step 2.
Enter the languages from the translation template you created earlier.
{
"source_language": "en-us",
"target_language": "es-es"
}
Response:
curl -X 'POST' \
'https://console.custom.mt/translation/get-templates' \
-H 'accept: application/json' \
-H 'token: ********' \
-H 'Content-Type: application/json' \
-H 'X-CSRFToken: *********' \
-d '{
"source_language": "en-us",
"target_language": "es-es"
}'
[
{
"template_name": "English-Spanish",
"engines": [
"MicrosoftProvider",
"AmazonProvider"
]
}
]
Get the list of templates for the selected languages by pressing Try it out and Execute buttons.
Response bodyload
Translate your text by adding the text to be translated and the template name and pressing Execute button.
Curl
Response