This method allows authenticated users to translate plain text. Only POST method is allowed.
{
"api_id" : "<YOUR_API_ID>",
"api_key" : "<YOUR_API_KEY>",
"translation_engine" : "nmt" | "apertium" | "apertiumc",
"translation_model" : "general" | "admin" (default "general"),
"language_pair" : "es-eu" | "eu-es",
"content_type" : "txt" | "html" | "xml",
"text" : "<ORIGINAL_TEXT>",
"glossaries" : "<GLOSSARY_IDS_COMMA_SEPARATED>"
"url" : "<URL>"
}
{
"original_text" : "<ORIGINAL_TEXT>",
"translated_text" : "<TRANSLATED_TEXT>",
"glossary_active_words" : "<GLOSSARY_ACT_WORDS>",
"source_sentences" : "<LIST_OF_SOURCE_SENTS>",
"translated_sentences" : "<LIST_OF_TRANSLATED_SENTS>",
"words" : "<WORDS>", #Translated words,
"execution_time": "73.4", # Execution time in seconds
}
This method allows authenticated users to translate files. Only POST method is allowed. It is an asynchronous method. On successful response, it returns a task_id identifier which allows to check current traslation process status.
{
"api_id" : "<YOUR_API_ID>",
"api_key" : "<YOUR_API_KEY>",
"translation_engine" : "nmt" | "apertium" | "apertiumc",
"translation_model" : "general" | "admin" (default "general"),
"language_pair" : "es-eu" | "eu-es",
"content_type" : "txt" | "docx" | "xlsx" | "pptx" | "odt" | "ods" | "odp" | "html" | "xml" | "xliff" | "txlf",
"file" : "<POSTED_FILE>",
"file_md5" : "<POSTED_FILE_MD5_CHECKSUM>",
"url" : url | null, # If url base should be set in html files,
"glossaries" : "<GLOSSARY_IDS_COMMA_SEPARATED>"
}
{
"task_id" : "<TASK_ID>", # Asynchronous task id
}
This method allows authenticated users to check for a particular document translation status. task_id is returned by the translate_file method. Only POST method is allowed.
{
"api_id" : "<YOUR_API_ID>",
"api_key" : <YOUR_API_KEY>",
"task_id" : "<TASK_ID>", # Asynchronous task id
}
{
"finished": False,
"error": False,
"percentage": "75",
"message": "Running translation", # Just an example
}
Task finished without errors. Translation successful
{
"finished": True,
"error": False,
"original_file": "<POSTED_FILE_URL>",
"trasnlated_file": "<TRANSLATED_FILE_URL>",
"words": "<WORDS>", #Translated words
"execution_time": "73.4", # Execution time in seconds
}
Task finished with errors. Unsuccessful translation
{
"finished": True,
"error": True,
"message": "There was an error", # Just an example
}
This method allows authenticated users to view the allowed language pairs and translation engines. Only POST method is allowed.
{
"api_id" : "<YOUR_API_ID>",
"api_key" : "<YOUR_API_KEY>"
"translation_model" : undefined | "general" | "admin" (default undefined)
}
[
{
"src": "es",
"tgt": "eu",
"engine": "nmt",
"type": "general"
},
{
"src": "eu",
"tgt": "es",
"engine": "nmt",
"type": "general"
}
]
This method allows authenticated users to detect the language of the text. Only POST method is allowed.
{
"api_id" : "<YOUR_API_ID>",
"api_key" : "<YOUR_API_KEY>",
"text" : "Esto es una prueba"
}
{
"text": "esto es una prueba",
"lang": "es",
"score": -72.19694900512695
}
This method allows authenticated users to view their current glossaries' id, name and whether they are active or not.
{
"api_id" : "<YOUR_API_ID>",
"api_key" : "<YOUR_API_KEY>"
}
glossaries : [
{
"id" : "<GLOSSARY_ID>",
"name" : "<GLOSSARY_NAME>",
"active" : "False"
},
{
"id" : "<GLOSSARY_ID>",
"name" : "<GLOSSARY_NAME>",
"active" : "False"
}
]
This method allows authenticated users to view their available languages and its localizations
{
"api_id" : "<YOUR_API_ID>",
"api_key" : "<YOUR_API_KEY>"
}
{
"languages": [
{
"code": es,
"tts": true,
"translations": {
"es": "Castellano",
"eu": "Gaztelania",
"en": "Spanish",
"fr": "Espagnol"
}
},
{
"code": eu,
"tts": true,
"translations": {
"es": "Euskera",
"eu": "Euskara",
"en": "Basque",
"fr": "Basque"
}
},
...
]
}