Pretranslate Documents
Pretranslate 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}'
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
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.
TM, TM+MT Body
The Document id(s) to pretranslate, plus optional pretranslation options.
A Document id, or an array of Document ids, to pretranslate.
[274, 275]
Pretranslation mode. Defaults to TM.
TM, TM+MT Auto-accept segments with 100% translation memory matches. Defaults to your organization's Accept and lock exact matches setting.
Use case-sensitive translation memory matching. Defaults to your organization's Use case sensitive translation memory matching setting.
Attribute translation authorship of exact matches to the author of the document. Defaults to your organization's Translation authorship setting.
Response
Pretranslation has been queued. Returns the current state of every requested Document.

