MTQE API (Machine Translation Quality Estimation)
The MTQE API allows evaluating translation quality automatically without the need for a human reference. It provides a score indicating the precision and fluency of the translated text relative to its source text.
To use the API, an apikey provided by Pangeanic at the time of sale is required.
Supported Languages (MTQE)
The following table details the available language pairs, including their names and the standardized encoding for API use.
Notes:
- Two-letter codes are used for most languages.
- Usage Note: Codes in API calls must always be sent in lowercase.
Available languages (click to expand)
| Source Language | Target Language | Source | Target |
|---|---|---|---|
| English | Czech | en |
cs |
| English | German | en |
de |
| English | Spanish | en |
es |
| English | Estonian | en |
et |
| English | Finnish | en |
fi |
| English | French | en |
fr |
| English | Gujarati | en |
gu |
| English | Hindi | en |
hi |
| English | Croatian | en |
hr |
| English | Hungarian | en |
hu |
| English | Icelandic | en |
is |
| English | Japanese | en |
ja |
| English | Kazakh | en |
kk |
| English | Khmer | en |
km |
| English | Lithuanian | en |
lt |
| English | Latvian | en |
lv |
| English | Polish | en |
pl |
| English | Romanian | en |
ro |
| English | Russian | en |
ru |
| English | Tamil | en |
ta |
| English | Turkish | en |
tr |
| English | Ukrainian | en |
uk |
| English | Chinese | en |
zh |
| Czech | English | cs |
en |
| German | English | de |
en |
| Finnish | English | fi |
en |
| Hebrew | English | he |
en |
| Icelandic | English | is |
en |
| Inuktitut | English | iu |
en |
| Kazakh | English | kk |
en |
| Livonian | English | liv |
en |
| Pashto | English | ps |
en |
| Russian | English | ru |
en |
| Turkish | English | tr |
en |
| Chinese | English | zh |
en |
| German | French | de |
fr |
| French | German | fr |
de |
| Czech | Ukrainian | cs |
uk |
| Ukrainian | Czech | uk |
cs |
| Japanese | Chinese | ja |
zh |
| Upper Sorbian | German | hsb |
de |
| German | Upper Sorbian | de |
hsb |
POST /score
Calculates the quality score for one or several segment pairs. The value will be between 0 and 1.
URL: https://api.pangeanic.com/service/mtqe/v1/score
Request Parameters
| Parameter | Type | Location | Description |
|---|---|---|---|
p-api-key |
string |
Header | Your API access key. |
source_language |
string |
Body | Source language code (e.g., "en"). See supported languages |
target_language |
string |
Body | Target language code (e.g., "es"). See supported languages |
pairs |
array |
Body | List of objects with source and target. |
import requests
url = "https://api.pangeanic.com/service/mtqe/v1/score"
headers = {
"accept": "application/json",
"p-api-key": "your-api-key-here",
"Content-Type": "application/json"
}
payload = {
"source_language": "en",
"target_language": "es",
"pairs": [
{
"source": "The quick brown fox jumps over the lazy dog.",
"target": "El veloz zorro marrón salta sobre el perro perezoso."
},
{
"source": "Never say never.",
"target": "Nunca digas nunca."
}
]
}
res = requests.post(url, json=payload, headers=headers)
print(res.json())
curl -X 'POST' \
'https://api.pangeanic.com/service/mtqe/v1/score' \
-H 'accept: application/json' \
-H 'p-api-key: your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{
"source_language": "en",
"target_language": "es",
"pairs": [
{
"source": "The quick brown fox jumps over the lazy dog.",
"target": "El veloz zorro marrón salta sobre el perro perezoso."
},
{
"source": "Never say never.",
"target": "Nunca digas nunca."
}
]
}'
Score Interpretation
| Score Range | Estimated Quality | Recommended Action |
|---|---|---|
| 0.90 - 1.00 | Excellent | Direct publication or minimal review. |
| 0.70 - 0.89 | Good | Light human review (light MTPE). |
| 0.40 - 0.69 | Medium / Low | Requires mandatory deep post-editing. |
| < 0.40 | Very Low | Invalid translation or incoherent content. |
Disclaimer
This interpretation is solely a suggestion based on statistical correlation with human perception. The final decision on quality will always depend on the degree of strictness and the specific quality requirements (KPIs) required for each translation project.
Common Errors
- 400 (Bad Request): The JSON body is invalid or mandatory fields are missing.
- 401 (Unauthorized): The
p-api-keyprovided in the header is incorrect or has expired. - 422 (Unprocessable Entity): The specified language is not supported by the current MTQE engine.