Translate

Translate a File

Changed on

Start machine translation of one or more Files that have previously been uploaded. The response will include an id parameter that can be used to monitor and download the translations in subsequent calls.

Example CURL:

curl -X POST 'https://api.lilt.com/v2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true'
post/v2/translate/file

Request

  • Base URL
    https://api.lilt.com
  • URL
    https://api.lilt.com/v2/translate/file
  • Auth
    HTTP basic

Query parameters

fileIdinteger required

List of File ids to be translated, comma separated.

memoryIdinteger required

Id of Memory to use in translation.

configIdinteger

An optional pararameter to specify an import configuration to be applied when extracting translatable content from this file.

withTMboolean

An optional boolean parameter to toggle the use of Translation Memory in the translation of the file. If not selected, the default setting is TRUE.

modelIdinteger

modelId — An optional parameter to specify a third-party model to use for translation. This allows you to use external MT providers (e.g., Google, DeepL, Amazon) instead of Lilt's built-in MT system. Pass the model's ID here, alongside memoryId.Note: this parameter is named differently across LILT APIs for historical reasons. On this endpoint, use modelId. On Create a Job, the equivalent field is externalModelId. On Create a Project, it's external_model_id. externalModelId is not read by this endpoint and has no effect if passed here.

Response

Translation Info

idinteger

Unique identifier for this translation.

fileIdinteger

id of the File that is being translated.

statusstring

Status of the translation - InProgress, ReadyForDownload, Completed, Failed.

createdAtinteger

Time when this translation was started, in seconds since the Unix epoch.

errorMsgstring

Error message, present when status is Failed.

Example response

[
  {
    "id": 1,
    "fileId": "2,",
    "status": "InProgress",
    "createdAt": 1609357135
  }
]

Changes

    • breaking

      added the new required query request parameter fileId

    • breaking

      added the new required query request parameter memoryId

    • info

      api operation id batchTranslateFile was added

    • info

      added the new optional query request parameter configId

    • info

      added the new optional query request parameter modelId

    • info

      added the new optional query request parameter withTM

    • info

      added the non-success response with the status

    • info

      added the success response with the status