Skip to main content

Lilt REST API (v3.0)

Download OpenAPI specification:Download

Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals
The Lilt REST API enables programmatic access to the full-range of Lilt backend services including:

  • Training of and translating with interactive, adaptive machine translation
  • Large-scale translation memory
  • The Lexicon (a large-scale termbase)
  • Programmatic control of the Lilt CAT environment
  • Translation memory synchronization

Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is https://api.lilt.com/.

Authentication

Requests are authenticated via REST API key, which requires the Business plan.

Requests are authenticated using HTTP Basic Auth. Add your REST API key as both the username and password.

For development, you may also pass the REST API key via the key query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use.

Quotas

Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request.

Languages

Retrieve supported languages

Get a list of supported languages.

Authorizations:
ApiKeyAuthBasicAuth

Responses

Response samples

Content type
application/json
{
  • "source_to_target": {
    },
  • "code_to_name": {
    }
}

Memories

Retrieve a Memory

Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory).

Authorizations:
ApiKeyAuthBasicAuth
query Parameters
id
integer

An optional Memory identifier.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update the name of a Memory

Update a Memory.

Authorizations:
ApiKeyAuthBasicAuth
Request Body schema: application/json
required

The Memory resource to update.

id
required
integer

A unique Memory identifier.

name
required
string

The Memory name.

Responses

Request samples

Content type
application/json
{
  • "id": 7246,
  • "name": "Automotive Memory"
}

Response samples

Content type
application/json
{
  • "id": 1234,
  • "srclang": "en",
  • "trglang": "fr",
  • "srclocale": "US",
  • "trglocale": "FR",
  • "name": "Acme Corp Support Content",
  • "is_processing": false,
  • "version": 78,
  • "created_at": 1489147692,
  • "updated_at": 1489147692,
  • "resources": [
    ]
}

Create a Memory

Create a new Memory. A Memory is a container that collects source/target sentences for a specific language pair (e.g., English>French). The data in the Memory is used to train the MT system, populate the TM, and update the lexicon. Memories are private to your account - the data is not shared across users - unless you explicitly share a Memory with your team (via web app only).

Refer to our KB for a more detailed description.

Authorizations:
ApiKeyAuthBasicAuth
Request Body schema: application/json
required

The Memory resource to create.

name
required
string

A name for the Memory.

srclang
required
string

An ISO 639-1 language identifier.

trglang
required
string

An ISO 639-1 language identifier.

srclocale
string

An ISO 3166-1 region name for language locales

trglocale
string

An ISO 3166-1 region name for language locales

Responses

Request samples

Content type
application/json
{
  • "name": "automotive",
  • "srclang": "en",
  • "trglang": "fr",
  • "srclocale": "US",
  • "trglocale": "FR"
}

Response samples

Content type
application/json
{
  • "id": 1234,
  • "srclang": "en",
  • "trglang": "fr",
  • "srclocale": "US",
  • "trglocale": "FR",
  • "name": "Acme Corp Support Content",
  • "is_processing": false,
  • "version": 78,
  • "created_at": 1489147692,
  • "updated_at": 1489147692,
  • "resources": [
    ]
}

Delete a Memory

Delete a Memory.

Authorizations:
ApiKeyAuthBasicAuth
query Parameters
id
required
integer

A unique Memory identifier.

Responses

Response samples

Content type
application/json
{
  • "id": 46530,
  • "deleted": true
}

Query a Memory

Perform a translation memory query.

Authorizations:
ApiKeyAuthBasicAuth
query Parameters
id
required
integer

A unique Memory identifier.

query
required
string

A source query.

n
integer
Default: 10

Maximum number of results to return.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

File import for a Memory

Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are *.tmx, *.sdltm, *.sdlxliff(With custom Filters), '*.xliff', and *.tmq for TM data; *.csv and *.tbx for termbase data. Request parameters should be passed as JSON object with the header field LILT-API.

Example CURL command to upload a translation memory file named my_memory.sdltm in the current working directory:

  curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \
    --header "LILT-API: {\"name\": \"my_memory.sdltm\",\"memory_id\": 42}" \
    --header "Content-Type: application/octet-stream" \
    --data-binary @my_memory.sdltm

Example CURL command to upload a translation memory file named my_memory.sdlxliff in the current working directory, with Custom Filters based on SDLXLIFF fields, conf_name which maps to, percentage, and whether we should ignore unlocked segments.

  curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \
    --header "LILT-API: {\"name\": \"my_memory.sdlxliff\",\"memory_id\": 12,\"sdlxliff_filters\":[{\"conf_name\": \"Translated\", \"percentage\": 100, \"allow_unlocked\": false}]"}" \
    --header "Content-Type: application/octet-stream" \
    --data-binary @my_memory.sdlxliff
Authorizations:
ApiKeyAuthBasicAuth
header Parameters
memory_id
required
integer

A unique Memory identifier.

name
required
string

Name of the TM or termbase file.

Array of objects (SDLXLIFFFilter)

Contains Filter information Unique to SDLXLIFF

has_header_row
boolean

A flag indicating whether an imported Termbase CSV has a header row or not (the default value is false).

skip_duplicates
boolean

A flag indicating whether or not to skip the import of segments which already exist in the memory. (the default value is false).

Request Body schema: application/octet-stream
required

The file contents to be uploaded. The entire POST body will be treated as the file.

string <binary> (MemoryImportBody)

Responses

Response samples

Content type
application/json
{
  • "id": 123,
  • "isProcessing": 1
}

Termbase export for a Memory

Exports the termbase entries for the given memory into a CSV file.

Calling this endpoint will begin the export process in the background. Check that the processing is complete by polling the GET /2/memories endpoint. When the is_processing value is 0 then call the POST /2/memories/termbase/download endpoint.

  curl -X POST https://api.lilt.com/v2/memories/termbase/export?key=API_KEY&id=ID
Authorizations:
ApiKeyAuthBasicAuth
query Parameters
id
required
integer

A unique Memory identifier.

Responses

Response samples

Content type
application/json
{
  • "id": 123,
  • "is_processing": 1
}

Termbase download for a Memory

Downloads the termbase export for the given memory as a CSV file.

Ensure you first call the /2/memories/termbase/export endpoint to start the export process before you try to download it.

  curl -X GET https://api.lilt.com/v2/memories/termbase/download?key=API_KEY&id=ID
Authorizations:
ApiKeyAuthBasicAuth
query Parameters
id
required
integer

A unique Memory identifier.

Responses

Response samples

Content type
application/json
"string"

Delete a segment from a memory.

Delete a segment from a memory.

  curl -X DELETE https://api.lilt.com/v2/memories/segment?key=API_KEY&id=ID&segment_id=$SEGMENT_ID
Authorizations:
ApiKeyAuthBasicAuth
query Parameters
id
required
integer

A unique Memory identifier.

segment_id
required
integer

A unique Segment identifier.

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Translate

Translate a segment

Translate a source string.

Setting the rich parameter to true will change the response format to include additional information about each translation including a model score, word alignments, and formatting information. The rich format can be seen in the example response on this page.

By default, this endpoint also returns translation memory (TM) fuzzy matches, along with associated scores. Fuzzy matches always appear ahead of machine translation output in the response.

The maximum source length is 5,000 characters.

Usage charges apply to this endpoint for production REST API keys.

Authorizations:
ApiKeyAuthBasicAuth
Request Body schema: application/json
optional
source
string

A unique Segment identifier.

memory_id
required
integer

A unique Memory identifier.

source_hash
integer

A source hash code.

n
integer

Return top n translations (deprecated).

prefix
string

A target prefix

rich
boolean
Default: false

Returns rich translation information (e.g., with word alignments).

tm_matches
boolean
Default: true

Include translation memory fuzzy matches.

project_tags
boolean
Default: false

Project tags. Projects tags in source to target if set to true.

containsICUData
boolean
Default: false

Contains ICU data. If true then tags in the source following the ICU standard will be parsed and retained.

Responses

Request samples

Content type
application/json
{
  • "source": "string",
  • "memory_id": 0,
  • "source_hash": 0,
  • "n": 0,
  • "prefix": "string",
  • "rich": false,
  • "tm_matches": true,
  • "project_tags": false,
  • "containsICUData": false
}

Response samples

Content type
application/json
{
  • "untokenizedSource": "Authentication not required.",
  • "tokenizedSource": "Authentication not required .",
  • "sourceDelimiters": [
    ],
  • "translation": [
    ]
}

Monitor file translation

Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided.

Example CURL:

curl -X GET 'https://api.lilt.com/v2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress'
Authorizations:
ApiKeyAuthBasicAuth
query Parameters
translationIds
string

List of translation ids, comma separated

status
string

One of the translation statuses - InProgress, Completed, Failed, ReadyForDownload

fromTime
number

Results after this time (inclusive) will be returned, specified as seconds since the Unix epoch.

toTime
number

Results before this time (exclusive) will be returned, specified as seconds since the Unix epoch.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Translate a File

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'
Authorizations:
ApiKeyAuthBasicAuth
query Parameters
fileId
required
string

List of File ids to be translated, comma separated.

memoryId
required
string

Id of Memory to use in translation.

configId
number

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

withTM
boolean

An optional boolean parameter to toggle the use of Translation Memory in the translation of the file.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Download translated file

Download a translated File.

Example CURL:

curl -X GET 'https://api.lilt.com/v2/translate/files?key=API_KEY&id=1'
Authorizations:
ApiKeyAuthBasicAuth
query Parameters
id
required
string

A translation id.

Responses

Response samples

Content type
application/json
{
  • "message": "Internal server error."
}

Create

Sign the Lilt Create terms and conditions

Lilt Create requires that the terms and conditions are signed first before using it. The terms and conditions can be signed by using this endpoint.

Example CURL:

curl -X POST 'https://api.lilt.com/v2/create/terms-and-conditions?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"signedAgreement": true}'
Authorizations:
ApiKeyAuthBasicAuth
Request Body schema: application/json
required

Whether or not to sign the agreement.

signedAgreement
required
boolean

Signifies that the Organization has signed the agreement or not.

Responses

Request samples

Content type
application/json
{
  • "signedAgreement": true
}

Response samples

Content type
application/json
{
  • "signedAgreement": true
}

Get Lilt Create content

Get a list of all content that has been generated by Lilt Create.

Example CURL:

curl -X GET 'https://api.lilt.com/v2/create?key=API_KEY'
Authorizations:
ApiKeyAuthBasicAuth

Responses

Response samples

Content type
application/json
{
  • "contents": [
    ]
}

Generate new Lilt Create content

Generate new Lilt Create content with the given parameters.

Example CURL:

curl -X POST 'https://api.lilt.com/v2/create?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "language":"en-US",
  "template":"blog-post",
  "templateParams":{
    "contentLength":"100",
    "language":"en-US",
    "sections":[],
    "summary":"a blog post about hiking"
    },
  "preferences":{"tone":"formal","styleguide":""}
}'
Authorizations:
ApiKeyAuthBasicAuth
Request Body schema: application/json
required

Input parameters that determine what content will be generated.

name
string

A name for the request content.

language
required
string

The language of the content.

template
required
string

The template of the content.

required
object

The template parameters of the content.

object

The preferences of the content.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "language": "string",
  • "template": "string",
  • "templateParams": {
    },
  • "preferences": {
    }
}

Response samples

Content type
application/json
{
  • "message": "Internal server error."
}

Get Lilt Create preferences

Get the stored preferences for Lilt Create.

Example CURL:

curl -X POST 'https://api.lilt.com/v2/create/preferences?key=API_KEY'
Authorizations:
ApiKeyAuthBasicAuth

Responses

Response samples

Content type
application/json
{
  • "message": "Internal server error."
}

Update Lilt Create preferences

Update the stored preferences for Lilt Create.

Example CURL:

curl -X PUT
'https://api.lilt.com/v2/create/preferences?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"tone": "formal", "styleguide": ""}'
Authorizations:
ApiKeyAuthBasicAuth
Request Body schema: application/json
optional

Which styleguide to use.

name
string

A name for the request content.

id
integer

A unique identifier for the generated content.

language
required
string

The language of the content.

template
required
string

The template of the content.

required
object

The template parameters of the content.

object

The preferences of the content.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "id": 0,
  • "language": "string",
  • "template": "string",
  • "templateParams": {
    },
  • "preferences": {
    }
}

Response samples

Content type
application/json
{
  • "message": "Internal server error."
}

Get Lilt Create content by ID.

Get Lilt Create content by ID.

Example CURL:

curl -X GET 'https://api.lilt.com/v2/create/1234?key=API_KEY'
Authorizations:
ApiKeyAuthBasicAuth
path Parameters
contentId
required
integer

The content ID.

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "id": 0,
  • "language": "string",
  • "template": "string",
  • "templateParams": {
    },
  • "preferences": {
    }
}

Update Lilt Create content

Update a piece of Lilt Create content.

Example CURL:

curl -X PUT 'https://api.lilt.com/v2/create/1234?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"language":"de-DE"}'
Authorizations:
ApiKeyAuthBasicAuth
path Parameters
contentId
required
integer

The content ID.

Request Body schema: application/json
optional
name
string

A name for the request content.

id
integer

A unique identifier for the generated content.

language
required
string

The language of the content.

template
required
string

The template of the content.

required
object

The template parameters of the content.

object

The preferences of the content.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "id": 0,
  • "language": "string",
  • "template": "string",
  • "templateParams": {
    },
  • "preferences": {
    }
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "id": 0,
  • "language": "string",
  • "template": "string",
  • "templateParams": {
    },
  • "preferences": {
    }
}

Delete Lilt Create content

Delete a piece of Lilt Create content.

Example CURL:

curl -X DELETE 'https://api.lilt.com/v2/create/1234?key=API_KEY'
Authorizations:
ApiKeyAuthBasicAuth
path Parameters
contentId
required
integer

The content ID.

Responses

Response samples

Content type
application/json
{
  • "id": 0
}

Regenerate Lilt Create content

Regenerate the given piece of content with the current parameters.

Example CURL:

curl -X GET 'https://api.lilt.com/v2/create/1234/create?key=API_KEY'
Authorizations:
ApiKeyAuthBasicAuth
path Parameters
contentId
required
integer

The content ID.

Responses

Response samples

Content type
application/json
{
  • "message": "Internal server error."
}

Workflows

Retrieve workflow templates

Get all of the possible Workflow Templates owned by the team. Useful for retrieving the ids corresponding to each workflow tables, and passing them to subsequent requests, for example, creating a new Job with a specific Workflow. Example CURL: bash curl -X GET 'https://api.lilt.com/v2/workflows/templates?key=API_KEY'

Authorizations:
ApiKeyAuthBasicAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Jobs

Retrieve all Jobs

Get all Jobs within a given offset and limit. You can retrieve jobs from your account using the above API.

Example CURL command:

curl -X GET 'https://api.lilt.com/v2/jobs?key=API_KEY&isArchived=false'
Authorizations:
ApiKeyAuthBasicAuth
query Parameters
isArchived
boolean

Retrieves all jobs that are archived.

isDelivered
boolean

Retrieves all jobs that are delivered.

offset
integer >= 0

Return jobs starting at the offset row. If not given the default offset will be 0.

limit
integer <= 50

The maximum number of jobs to be returned. If not given the default limit will be 25.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a Job

Create a Job. A Job is a collection of Projects. A Job will contain multiple projects, based on the language pair. A Project is associated with exactly one Memory.

Jobs appear in the Jobs dashboard of the web app.

Example CURL command:

curl -X POST 'https://api.lilt.com/v2/jobs?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "test job",
  "fileIds": [5009, 5010, 5011],
  "due": "2022-05-05T10:56:44.985Z",
  "srcLang": "en",
  "srcLocale": "US",
  "languagePairs": [
      { "memoryId": 3121, "trgLang": "de" },
      { "memoryId": 2508, "trgLang": "fr" },
      { "memoryId": 3037, "trgLang": "zh" }
    ]
}'
Authorizations:
ApiKeyAuthBasicAuth
Request Body schema: application/json
required

The Job resource to create.

name
required
string

A name for the Job.

required
Array of objects (LanguagePair)

Language pairs is a set of one or more pairs that includes source language, source locale(optional), target language, target locale(optional), and memoryId.

fileIds
required
Array of integers

A list of file ids to upload to job creation.

due
string

An ISO string date representing job due date.

srcLang
required
string

2-letter ISO source language code

srcLocale
required
string

2-letter source language code

isPlural
boolean

A boolean value representing if the files have plurals.

workflowTemplateId
integer

ID of the workflow template to be used. Use the workflows templates endpoint to get the list of available workflows.

Responses

Request samples

Content type
application/json
{
  • "name": "My new Job",
  • "languagePairs": [
    ],
  • "fileIds": [
    ],
  • "due": "2021-10-05T14:48:00.000Z",
  • "srcLang": "en",
  • "srcLocale": "US",
  • "isPlural": true,
  • "workflowTemplateId": 0
}

Response samples

Content type
application/json
{
  • "name": "My New Job",
  • "creationStatus": "COMPLETE",
  • "deliveredAt": "2021-06-03T13:43:00Z",
  • "status": "active",
  • "due": "2021-06-03T13:43:00Z",
  • "id": 241,
  • "isProcessing": 0,
  • "stats": {
    }
}

Retrieve a Job

Retrieves a job data along with stats. To retrieve a specific job, you will need the job id in the url path.

Example CURL command:

curl -X GET 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY'
Authorizations:
ApiKeyAuthBasicAuth
path Parameters
jobId
required
integer

A job id.

Responses

Response samples

Content type
application/json
{
  • "name": "My New Job",
  • "creationStatus": "COMPLETE",
  • "deliveredAt": "2021-06-03T13:43:00Z",
  • "status": "active",
  • "due": "2021-06-03T13:43:00Z",
  • "id": 241,
  • "isProcessing": 0,
  • "stats": {
    }
}

Update a Job

Updates a job with the new job properties. To update a specific job, you will need the job id in the url path.

You can update job's name and due date by passing the property and new value in the body.

Example CURL command:

curl -X PUT 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "test job",
  "due": "2022-05-05T10:56:44.985Z"
}'
Authorizations:
ApiKeyAuthBasicAuth
path Parameters
jobId
required
integer

A job id.

Request Body schema: application/json
optional

The Job resource to update.

name
string

A name for the Job.

dueDate
integer

An ISO string date.

isProcessing
string
Enum: "0" "1" "-2"

The processing status of the job. Provide one of the following integers to indicate the status.

Ok = 0 Started = 1 ExportError = -2

processingErrorMsg
string

The processing error message.

Responses

Request samples

Content type
application/json
{
  • "name": "My new Job",
  • "dueDate": 0,
  • "isProcessing": "ExportError",
  • "processingErrorMsg": "Authentication failed. Check your Contentful API Key."
}

Response samples

Content type
application/json
{
  • "name": "My New Job",
  • "creationStatus": "COMPLETE",
  • "deliveredAt": "2021-06-03T13:43:00Z",
  • "status": "active",
  • "due": "2021-06-03T13:43:00Z",
  • "id": 241,
  • "isProcessing": 0,
  • "stats": {
    }
}

Delete a Job

Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories.

Example CURL command:

curl -X DELETE 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY'
Authorizations:
ApiKeyAuthBasicAuth
path Parameters
jobId
required
integer

A job id.

Responses

Response samples

Content type
application/json
{
  • "id": 241
}

Retrieve Job Leverage Stats

Get the TM leverage stats for the job (new/exact/fuzzy matches).

Example CURL command:

curl -X POST 'https://api.lilt.com/v2/jobs/{id}/stats?key=API_KEY'
Authorizations:
ApiKeyAuthBasicAuth
path Parameters
jobId
required
integer

A job id.

Responses

Response samples

Content type
application/json
{
  • "sourceWords": 0,
  • "exactWords": 0,
  • "fuzzyWords": 0,
  • "newWords": 0,
  • "projects": [
    ]
}

Archive a Job

Set job to archived, unassign all linguists and archive all projects and documents inside the job.

It will return the archived job.

Example CURL command:

curl -X POST 'https://api.lilt.com/v2/jobs/{id}/archive?key=API_KEY'
Authorizations:
ApiKeyAuthBasicAuth
path Parameters
jobId
required
integer

A job id.

Responses

Response samples

Content type
application/json
{
  • "name": "My New Job",
  • "creationStatus": "COMPLETE",
  • "deliveredAt": "2021-06-03T13:43:00Z",
  • "status": "active",
  • "due": "2021-06-03T13:43:00Z",
  • "id": 241,
  • "isProcessing": 0,
  • "stats": {
    }
}

Unarchive a Job

Set job to unarchived, the job will move to active status.

Example CURL command:

curl -X POST 'https://api.lilt.com/v2/jobs/{id}/unarchive?key=API_KEY'
Authorizations:
ApiKeyAuthBasicAuth
path Parameters
jobId
required
integer

A job id.

Responses

Response samples

Content type
application/json
{
  • "name": "My New Job",
  • "creationStatus": "COMPLETE",
  • "deliveredAt": "2021-06-03T13:43:00Z",
  • "status": "active",
  • "due": "2021-06-03T13:43:00Z",
  • "id": 241,
  • "isProcessing": 0,
  • "stats": {
    }
}

Deliver a Job

Set the job state to delivered and set all the projects in the job to done

It will return the delivered job.

Example CURL command:

curl -X POST 'https://api.lilt.com/v2/jobs/{id}/deliver?key=API_KEY'
Authorizations:
ApiKeyAuthBasicAuth
path Parameters
jobId
required
integer

A job id.

Responses

Response samples

Content type
application/json
{
  • "name": "My New Job",
  • "creationStatus": "COMPLETE",
  • "deliveredAt": "2021-06-03T13:43:00Z",
  • "status": "active",
  • "due": "2021-06-03T13:43:00Z",
  • "id": 241,
  • "isProcessing": 0,
  • "stats": {
    }
}

Reactivate a Job

Set the job state to active. Does not change the state of projects associated with the given job.

It will return the reactivated job.

Example CURL command:

curl -X POST 'https://api.lilt.com/v2/jobs/{id}/reactivate?key=API_KEY'
Authorizations:
ApiKeyAuthBasicAuth
path Parameters
jobId
required
integer

A job id.

Responses

Response samples

Content type
application/json
{
  • "name": "My New Job",
  • "creationStatus": "COMPLETE",
  • "deliveredAt": "2021-06-03T13:43:00Z",
  • "status": "active",
  • "due": "2021-06-03T13:43:00Z",
  • "id": 241,
  • "isProcessing": 0,
  • "stats": {
    }
}

Export a Job

Prepare job files for download. To export translated documents from the job use the query parameter type=files:

Example CURL command:

curl -X GET 'https://api.lilt.com/v2/jobs/{id}/export?key=API_KEY&type=files'

To export job memories use the query parameter type=memory.

The status of the export can be checked by requesting the job GET /jobs/:jobId, job.isProcessing will be 1 while in progress, 0 when idle and -2 when the export failed.

Authorizations:
ApiKeyAuthBasicAuth
path Parameters
jobId
required
integer

A job id.

query Parameters
type
required
string

category for files and memory.

Responses

Response samples

Content type
application/json
{
  • "message": "Internal server error."
}

Download a Job

Make sure you have exported a job with the same id before using this api.

Downloading files requires the exported job id in the param.

Example CURL command:

curl -X GET 'https://api.lilt.com/v2/jobs/{id}/download?key=API_KEY'
Authorizations:
ApiKeyAuthBasicAuth
path Parameters
jobId
required
integer

A job id.

Responses

Response samples

Content type
application/json
{
  • "message": "Internal server error."
}

Projects

Retrieve a Project

Retrieves one or more projects, including the documents associated with each project. Retrieving a project is the most efficient way to retrieve a single project, multiple projects or a list of all available projects.

To retrieve a specific project, specify the id request parameter or you can retrieve multiple projects by adding comma (,) between ids eg. ?id=1234,5678. To retrieve all projects, omit the id request parameter. To limit the retrieved projects to those with a particular source language or target language, specify the corresponding ISO 639-1 language codes in the srclang and trglang request parameters, respectively.

Authorizations:
ApiKeyAuthBasicAuth
query Parameters
id
integer

A unique Project identifier. It can be a single id or multiple ids separated by a comma

srclang
string

An ISO 639-1 language code.

trglang
string

An ISO 639-1 language code.

from_time
integer

Unix time stamp (epoch, in seconds) of Projects with created_at greater than or equal to the value.

to_time
integer

Unix time stamp (epoch, in seconds) of Projects with created_at less than the value.

state
string

A project state (backlog, inProgress, inReview, inQA, done).

archived
boolean

A flag that toggles whether to include archived projects in the response (the default is true).

connector_id
integer

A unique Connector identifier.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a Project

Create a Project. A Project is a collection of Documents.

A Project is associated with exactly one Memory.

Projects appear in the dashboard of the web app.

Authorizations:
ApiKeyAuthBasicAuth
Request Body schema: application/json
required

The Project resource to create.

name
required
string

A name for the Project.

memory_id
required
integer

The Memory to associate with this new Project.

job_id
integer

The Job to associate with this new Project. If a Job ID is not provided then a new Job will be created to contain the Project.

due_date
integer

The due date. Measured in seconds since the Unix epoch.

metadata
object

A JSON object of key/value string pairs. Stores custom project information.

workflowTemplateId
integer

The workflow template used to create this project. WorkflowTemplateIds can be retrieved via the /workflows/templates endpoint. If not specified then the organization default workflowTemplateId will be used.

Responses

Request samples

Content type
application/json
{
  • "name": "My new project",
  • "memory_id": 1234,
  • "job_id": 1234,
  • "due_date": 1489147692,
  • "metadata": {
    },
  • "workflowTemplateId": 14
}

Response samples

Content type
application/json
{
  • "id": 448,
  • "memory_id": 1234,
  • "job_id": 1234,
  • "srclang": "en",
  • "trglang": "fr",
  • "srclocale": "US",
  • "trglocale": "FR",
  • "name": "My New Project",
  • "state": "backlog",
  • "due_date": 1489147692,
  • "archived": false,
  • "metadata": {
    },
  • "sample_review_percentage": 20,
  • "created_at": 1489147692,
  • "updated_at": 1489147692,
  • "workflowStatus": "READY_TO_START",
  • "document": [
    ]
}

Delete a Project

Delete a Project.

Authorizations:
ApiKeyAuthBasicAuth
query Parameters
id
integer

A unique Project identifier.

Responses

Response samples

Content type
application/json
{
  • "id": 46530,
  • "deleted": true
}

Documents

Download a Document

Export a Document that has been translated in the Lilt web application. Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting is_xliff=false. This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. Example CURL command:

  curl -X GET https://api.lilt.com/v2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff
Authorizations:
ApiKeyAuthBasicAuth
query Parameters
id
required
integer

An unique Document identifier.

is_xliff
boolean
Default: true

Download the document in XLIFF 1.2 format.

Responses

Upload a File

Create a Document from a file in any of the formats documented in our knowledge base. Request parameters should be passed as JSON object with the header field LILT-API.

File names in the header can only contain US-ASCII characters. File names with characters outside of US-ASCII should be URI encoded or transliterated to US-ASCII strings.

Example CURL command:

  curl -X POST https://api.lilt.com/v2/documents/files?key=API_KEY \
  --header "LILT-API: {\"name\": \"introduction.xliff\",\"pretranslate\": \"tm+mt\",\"project_id\": 9}" \
  --header "Content-Type: application/octet-stream" \
  --data-binary @Introduction.xliff
Authorizations:
ApiKeyAuthBasicAuth
header Parameters
name
required
string

A file name.

project_id
required
integer

A unique Project identifier.

pretranslate
string

An optional parameter indicating if and how the document will be pretranslated upon being uploaded. The accepted values are TM, or TM+MT

auto_accept
boolean

An optional parameter to auto-accept segments with 100% translation memory matches when the pretranslate option is also set, or to auto-accept any target data that is present when the uploaded file is XLIFF. If omitted it will default to your organization settings for Accept and lock exact matches, if set to false, no segments will be auto-accepted.

case_sensitive
boolean

An optional parameter to use case sensitive translation memory matching when the pretranslate option is also enabled. Matches must have identical character-by-character case to qualify as matches. Default value matches your organization settings for Use case sensitive translation memory matching setting

match_attribution
boolean

An optional parameter to attribute translation authorship of exact matches to the author of the file when the pretranslate option is also enabled. Default value matches your organization settings for Translation authorship setting

config_id
integer

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

Request Body schema: application/octet-stream
required

The file contents to be uploaded. The entire POST body will be treated as the file.

string <binary> (DocumentUploadBody)

Responses

Response samples

Content type
application/json
{
  • "id": 46530,
  • "project_id": 287,
  • "srclang": "en",
  • "trglang": "de",
  • "name": "Introduction.xliff",
  • "import_in_progress": false,
  • "import_succeeded": false,
  • "import_error_message": "Could not parse XML.",
  • "export_in_progress": false,
  • "export_succeeded": false,
  • "export_error_message": "Could not parse XML.",
  • "is_pretranslating": false,
  • "status": {
    },
  • "translator_email": "translator@example.com",
  • "reviewer_email": "reviewer@example.com",
  • "created_at": 1489147692,
  • "updated_at": 1489147692,
  • "is_review_complete": true,
  • "segments": [
    ]
}

Files

Retrieve a File

Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step.

To retrieve a specific file, specify the id request parameter. To retrieve all files, omit the id request parameter.

Example CURL command:

 curl -X GET https://api.lilt.com/v2/files?key=API_KEY&id=274
Authorizations:
ApiKeyAuthBasicAuth
query Parameters
id
integer

A unique File identifier.

labels
Array of strings

One or more labels. This will return the files which contain all of the given labels.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Upload a File

Upload a File in any of the formats documented in our knowledge base. Request parameters should be passed in as query string parameters.

Example CURL command:

  curl -X POST https://api.lilt.com/v2/files?key=API_KEY&name=en_US.json \
  --header "Content-Type: application/octet-stream" \
  --data-binary @en_US.json

Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score.

The language detection will complete asynchronously. Prior to completion, the detected_lang value will be zxx, the reserved ISO 639-2 code for "No linguistic content/not applicable".

If the language can not be determined, or the detection process fails, the detected_lang field will return und, the reserved ISO 639-2 code for undetermined language, and the detected_lang_confidence score will be 0.

Authorizations:
ApiKeyAuthBasicAuth
query Parameters
name
required
string

A file name.

file_hash
string

A hash value to associate with the file. The MD5 hash of the body contents will be used by default if a value isn't provided.

langId
boolean

Flag indicating whether to perform language detection on the uploaded file. Default is false.

project_id
integer

The project to associate the uploaded file with.

category
string

The category of the file. The options are REFERENCE, or API. The default is API. Files with the REFERENCE category will be displayed as reference material.

labels
string

Comma-separated list of labels to add to the uploaded document.

Request Body schema: application/octet-stream
required

The file contents to be uploaded. The entire POST body will be treated as the file.

string <binary> (FileUploadBody)

Responses

Response samples

Content type
application/json
{
  • "id": 46530,
  • "name": "en_US.json",
  • "file_hash": "3858f62230ac3c915f300c664312c63f",
  • "detected_lang": "de",
  • "detected_lang_confidence": 0.7,
  • "category": "REFERENCE",
  • "labels": [ ],
  • "created_at": "2019-10-16T22:12:34Z",
  • "updated_at": "2019-10-16T22:12:34Z"
}

Delete a File

Delete a File.

Example CURL command:

  curl -X DELETE https://api.lilt.com/v2/files?key=API_KEY&id=123 
Authorizations:
ApiKeyAuthBasicAuth
query Parameters
id
required
integer

A unique File identifier.

Responses

Response samples

Content type
application/json
{
  • "id": 12345,
  • "deleted": true
}

Download file

Download a File.

Example CURL:

curl -X GET 'https://api.lilt.com/v2/files/download?key=API_KEY&id=1'
Authorizations:
ApiKeyAuthBasicAuth
query Parameters
id
required
string

A File id.

Responses

Response samples

Content type
application/json
{
  • "message": "Internal server error."
}

Add Label to File

Add a label to a File.

Example CURL:

curl -X POST 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1'
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "label_name"
}'
Authorizations:
ApiKeyAuthBasicAuth
query Parameters
id
required
string

A File id.

Request Body schema: application/json
required

A label name.

name
string

The Label name.

Responses

Request samples

Content type
application/json
{
  • "name": "label_name"
}

Response samples

Content type
application/json
{
  • "message": "Internal server error."
}

Remove Label from File

Remove a label from a File.

Example CURL:

curl -X DELETE 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1&name=label_name'
Authorizations:
ApiKeyAuthBasicAuth
query Parameters
id
required
string

A File id.

name
required
string

A label name.

Responses

Response samples

Content type
application/json
{
  • "message": "Internal server error."
}