curl --request GET \
--url https://eu.phrase.com/smt/api/v1/fileTranslations/{uid}/{actionType}/{language} \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>'"--Boundary_1_1453803947_1691603987728\nContent-Type: application/octet-stream\nContent-Disposition: form-data; name=\"file\"; filename=\"test.txt\"\nPřeložený text\n\n--Boundary_1_1453803947_1691603987728\nContent-Type: application/json\nContent-Disposition: form-data; name=\"metadata\"\n\n{\"sourceLang\":{\"code\":\"en\"},\"targetLangs\":[{\"code\":\"cs\"}],\"actionTypes\":[\"MT_GENERIC_PRETRANSLATE\"],\"callbackUrl\":\"https://your-server.com/send/data/here\"}\n--Boundary_1_1453803947_1691603987728--\n"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>'"--Boundary_1_1453803947_1691603987728\nContent-Type: application/octet-stream\nContent-Disposition: form-data; name=\"file\"; filename=\"test.txt\"\nPřeložený text\n\n--Boundary_1_1453803947_1691603987728\nContent-Type: application/json\nContent-Disposition: form-data; name=\"metadata\"\n\n{\"sourceLang\":{\"code\":\"en\"},\"targetLangs\":[{\"code\":\"cs\"}],\"actionTypes\":[\"MT_GENERIC_PRETRANSLATE\"],\"callbackUrl\":\"https://your-server.com/send/data/here\"}\n--Boundary_1_1453803947_1691603987728--\n"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?