Pretranslate Documents
Changed onPretranslate one or more Documents using translation memory (TM) and, optionally, machine translation (MT). Only documents that are not currently importing/exporting and are not already pretranslating will be pretranslated; the response always reflects the current state of every requested Document id, whether or not it was eligible.
This is an asynchronous operation. The endpoint returns immediately with a 202 response once pretranslation has been queued; poll the Document resource (or the is_pretranslating / status.pretranslation fields it returns) to see when pretranslation has finished.
This endpoint is subject to a per-organization rate limit. See the API Rate Limits guide for details on how to read 429 responses and batch requests efficiently by passing multiple document ids in a single call.
Example CURL:
curl -X POST 'https://api.lilt.com/v2/documents/pretranslate?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"id": [274, 275], "mode": "TM+MT", "auto_accept": true}'
Request
- Base URLhttps://api.lilt.com
- URLhttps://api.lilt.com/v2/documents/pretranslate
- AuthHTTP basic
Query parameters
Auto-accept segments with 100% translation memory matches. Can also be passed in the request body. Defaults to your organization's Accept and lock exact matches setting.
Use case-sensitive translation memory matching. Can also be passed in the request body. Defaults to your organization's Use case sensitive translation memory matching setting.
Attribute translation authorship of exact matches to the author of the document. Can also be passed in the request body. Defaults to your organization's Translation authorship setting.
Pretranslation mode. Can also be passed in the request body. Defaults to TM.
Request body
Response
Pretranslation has been queued. Returns the current state of every requested Document.
Example response
{
"id": [
274,
275
],
"is_pretranslating": true,
"documents": [
{
"id": 46530,
"project_id": 287,
"srclang": "en",
"trglang": "de",
"name": "Introduction.xliff",
"import_error_message": "Could not parse XML.",
"export_error_message": "Could not parse XML.",
"status": {
"pretranslation": "idle"
},
"translator_email": "translator@example.com",
"reviewer_email": "reviewer@example.com",
"customer_reviewer_email": "reviewer@example.com",
"created_at": 1489147692,
"updated_at": 1489147692,
"is_review_complete": true
}
]
}Changes
- breaking
added required request body
- info
api operation id
pretranslateDocumentswas added - info
added the new optional
queryrequest parameterattribute_to_creator - info
added the new optional
queryrequest parameterauto_accept - info
added the new optional
queryrequest parametercase_sensitive - info
added the new optional
queryrequest parametermode - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the success response with the status
- breaking