curl --request GET \
--url https://eu.phrase.com/smt/api/v1/fileTranslations/{uid}/{actionType}/{language} \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>'{
"metadata": {
"sourceLang": {
"code": "cs"
},
"targetLangs": [
{
"code": "cs"
}
],
"actionTypes": [
"MT_GENERIC_PRETRANSLATE"
],
"callbackUrl": "<string>",
"mtSettings": {
"usePhraseMTSettings": true,
"profile": {
"uid": "CFUki8ptanoz1WAIYoXSH4"
}
},
"transMemoriesConfig": [
{
"targetLang": {
"code": "cs"
},
"transMemories": [
{
"transMemory": {
"uid": "<string>"
},
"tmSourceLocale": {
"code": "cs"
},
"tmTargetLocale": {
"code": "cs"
}
}
]
}
]
},
"file": "<string>"
}Use the Accept header with either application/octet-stream to get the file or use application/json to get the quality estimation.
curl --request GET \
--url https://eu.phrase.com/smt/api/v1/fileTranslations/{uid}/{actionType}/{language} \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>'{
"metadata": {
"sourceLang": {
"code": "cs"
},
"targetLangs": [
{
"code": "cs"
}
],
"actionTypes": [
"MT_GENERIC_PRETRANSLATE"
],
"callbackUrl": "<string>",
"mtSettings": {
"usePhraseMTSettings": true,
"profile": {
"uid": "CFUki8ptanoz1WAIYoXSH4"
}
},
"transMemoriesConfig": [
{
"targetLang": {
"code": "cs"
},
"transMemories": [
{
"transMemory": {
"uid": "<string>"
},
"tmSourceLocale": {
"code": "cs"
},
"tmTargetLocale": {
"code": "cs"
}
}
]
}
]
},
"file": "<string>"
}Media type which caller expects as a response.
UID of the operation. See File translations endpoint.
File associated with the specified action type will be returned, if the action was completed.
CONVERTER_IMPORT, FILE_IMPORT, MT_GENERIC_PRETRANSLATE, QUALITY_ESTIMATION "MT_GENERIC_PRETRANSLATE"
Requested language of the file. Please note different actions have different languages available.
Action result has been successfully returned.
Show child attributes
Show child attributes
Language code, using a two-letter language code from ISO 639-1, e.g., cs. Optionally, a region subtag based on a two-letter country code from ISO 3166-1 alpha-2, e.g., cs_cz, or a three-digit code from UN M.49, e.g., es_419, separated by an underscore. Both the two-letter language code and the two-letter country code need to be lower case.
Note that the Phrase Language AI setup dictates whether the region subtag is optional or not. If the only models deployed to a profile explicitly specify or are customized with a target locale, then a region subtag is mandatory.
"cs"
1Show child attributes
Language code, using a two-letter language code from ISO 639-1, e.g., cs. Optionally, a region subtag based on a two-letter country code from ISO 3166-1 alpha-2, e.g., cs_cz, or a three-digit code from UN M.49, e.g., es_419, separated by an underscore. Both the two-letter language code and the two-letter country code need to be lower case.
Note that the Phrase Language AI setup dictates whether the region subtag is optional or not. If the only models deployed to a profile explicitly specify or are customized with a target locale, then a region subtag is mandatory.
"cs"
1CONVERTER_IMPORT, FILE_IMPORT, MT_GENERIC_PRETRANSLATE, QUALITY_ESTIMATION Show child attributes
Show child attributes
Show child attributes
Language code, using a two-letter language code from ISO 639-1, e.g., cs. Optionally, a region subtag based on a two-letter country code from ISO 3166-1 alpha-2, e.g., cs_cz, or a three-digit code from UN M.49, e.g., es_419, separated by an underscore. Both the two-letter language code and the two-letter country code need to be lower case.
Note that the Phrase Language AI setup dictates whether the region subtag is optional or not. If the only models deployed to a profile explicitly specify or are customized with a target locale, then a region subtag is mandatory.
"cs"
Show child attributes
Show child attributes
Language code, using a two-letter language code from ISO 639-1, e.g., cs. Optionally, a region subtag based on a two-letter country code from ISO 3166-1 alpha-2, e.g., cs_cz, or a three-digit code from UN M.49, e.g., es_419, separated by an underscore. Both the two-letter language code and the two-letter country code need to be lower case.
Note that the Phrase Language AI setup dictates whether the region subtag is optional or not. If the only models deployed to a profile explicitly specify or are customized with a target locale, then a region subtag is mandatory.
"cs"
Show child attributes
Language code, using a two-letter language code from ISO 639-1, e.g., cs. Optionally, a region subtag based on a two-letter country code from ISO 3166-1 alpha-2, e.g., cs_cz, or a three-digit code from UN M.49, e.g., es_419, separated by an underscore. Both the two-letter language code and the two-letter country code need to be lower case.
Note that the Phrase Language AI setup dictates whether the region subtag is optional or not. If the only models deployed to a profile explicitly specify or are customized with a target locale, then a region subtag is mandatory.
"cs"
The file data.
Was this page helpful?