We submit a document to Lilt for translation with the following process:
- Create a document on Lilt and get the
document_id
from the response:POST https://lilt.com/2/documents/files LILT-API: {"project_id"=project_id,"name"="filename"} Content-Type: application/octet-stream
- Wait for the document import to complete (until the response indicates that
import_in_progress
isfalse
):GET https://lilt.com/2/documents/files?id=document_id&with_segments=false
- Initiate pre-translation by calling
POST https://lilt.com/2/documents/pretranslate Content-Type: application/json {"id": [document_id]}
- Wait for the pre-translation to complete (until the response indicates that
is_pretranslating
isfalse
)GET https://lilt.com/2/documents/files?id=document_id&with_segments=false