MachineTranslation.com API Documentation
Overview
The MachineTranslation.com API provides a streamlined and efficient way to translate text between different languages. This API focuses on a simple process: receiving the source text, performing the translation, and sending back the translated text. It supports multiple translation engines, ensuring reliable and high-quality translations for various language pairs.
Base URL
Authentication
The API uses JSON Web Tokens (JWT) for authentication. Include your JWT in the Authorization
header for each request.
Example
Request an API Key
To access the MachineTranslation.com API, you need an API key. Contact us to request for an API key.
Endpoints
Create Translation
Translate text from one language to another using a specified translation engine.
HTTP Request
Headers
Authorization: JWT <your_jwt_token>
Content-Type: application/json
Request Body
text
: (string) The text to be translated.source_language_code
: (string) The language code of the source text (e.g., "en" for English).target_language_code
: (string) The language code of the target text (e.g., "hi" for Hindi).
Example Request
Response
translations
: An array of translation results from different engines.engine
: (string) The translation engine used.share_id
: (string) The share ID of the translation.source_text
: (string) The original text.target_text
: (string) The translated text.source_word_count
: (number) Word count of the source text.target_word_count
: (number) Word count of the translated text.source_language_code
: (string) Language code of the source text.target_language_code
: (string) Language code of the translated text.
meta
: Metadata related to the translation request.short_url
: (string) Short URL for the translation.total_words
: (number) Total word count of the source text.
Supported Languages
Below are the supported languages and their codes:
Translation Engines
MachineTranslation.com supports the following translation engines:
Google
DeepL
Amazon
ModernMT
Microsoft
ChatGPT
LibreTranslate
IBM
Lingvanex
Niutrans
Royalflush
Last updated