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/
.
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.
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.
Retrieve supported languages
Get a list of supported languages.
Authorizations:
Responses
Response samples
- 200
- default
{- "source_to_target": {
- "en": {
- "da": true,
- "de": true,
- "fr": true,
- "...": "..."
}, - "...": "..."
}, - "code_to_name": {
- "aa": "Afar",
- "ab": "Abkhazian",
- "af": "Afrikaans",
- "...": "..."
}
}
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:
query Parameters
id | integer An optional Memory identifier. |
Responses
Response samples
- 200
- default
[- {
- "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": [
- "string"
]
}
]
Update the name of a Memory
Update a Memory.
Authorizations:
Request Body schema: application/jsonrequired
The Memory resource to update.
id required | integer A unique Memory identifier. |
name required | string The Memory name. |
Responses
Request samples
- Payload
{- "id": 7246,
- "name": "Automotive Memory"
}
Response samples
- 200
- default
{- "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": [
- "string"
]
}
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:
Request Body schema: application/jsonrequired
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
- Payload
{- "name": "automotive",
- "srclang": "en",
- "trglang": "fr",
- "srclocale": "US",
- "trglocale": "FR"
}
Response samples
- 200
- default
{- "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": [
- "string"
]
}
Query a Memory
Perform a translation memory query.
Authorizations:
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
- 200
- default
[- {
- "source": "The red bus.",
- "target": "Le bus rouge.",
- "score": 100,
- "metadata": { }
}
]
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:
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 |
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 |
Request Body schema: application/octet-streamrequired
The file contents to be uploaded. The entire POST body will be treated as the file.
Responses
Response samples
- 200
- default
{- "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:
query Parameters
id required | integer A unique Memory identifier. |
Responses
Response samples
- 200
- default
{- "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:
query Parameters
id required | integer A unique Memory identifier. |
Responses
Response samples
- 200
- default
"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:
query Parameters
id required | integer A unique Memory identifier. |
segment_id required | integer A unique Segment identifier. |
Responses
Response samples
- 200
- default
{- "success": true
}
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:
Request Body schema: application/jsonoptional
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
- Payload
{- "source": "string",
- "memory_id": 0,
- "source_hash": 0,
- "n": 0,
- "prefix": "string",
- "rich": false,
- "tm_matches": true,
- "project_tags": false,
- "containsICUData": false
}
Response samples
- 200
- default
{- "untokenizedSource": "Authentication not required.",
- "tokenizedSource": "Authentication not required .",
- "sourceDelimiters": [
- "",
- " ",
- " ",
- "",
- ""
], - "translation": [
- [
- {
- "score": 3.4936864e-8,
- "align": "0-0 1-1 2-2 3-3",
- "targetDelimiters": [
- "",
- " ",
- " ",
- "",
- ""
], - "targetWords": [
- "Authentifizierung",
- "nicht",
- "erforderlich",
- "."
], - "target": "Authentifizierung nicht erforderlich .",
- "targetWithTags": "Authentifizierung nicht erforderlich.",
- "isTMMatch": false,
- "provenance": "0 0 0 0"
}
]
]
}
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 --request GET 'https://api.lilt.com/v2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress'
Authorizations:
query Parameters
translationIds | string List of translation ids, comma separated |
status | string One of the translation statuses - |
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
- 200
- default
[- {
- "id": 1,
- "fileId": "2,",
- "status": "InProgress",
- "createdAt": 1609357135
}
]
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 --request POST 'https://api.lilt.com/v2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true'
Authorizations:
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
- 200
- default
[- {
- "id": 1,
- "fileId": "2,",
- "status": "InProgress",
- "createdAt": 1609357135
}
]
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 --request POST 'https://api.lilt.com/v2/create/terms-and-conditions?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"signedAgreement": true}'
Authorizations:
Request Body schema: application/jsonrequired
Whether or not to sign the agreement.
signedAgreement required | boolean Signifies that the Organization has signed the agreement or not. |
Responses
Request samples
- Payload
{- "signedAgreement": true
}
Response samples
- 200
{- "signedAgreement": true
}
Get Lilt Create content
Get a list of all content that has been generated by Lilt Create.
Example CURL:
curl --X --request GET 'https://api.lilt.com/v2/create?key=API_KEY'
Authorizations:
Responses
Response samples
- 200
{- "contents": [
- {
- "language": "string",
- "template": "string",
- "templateParams": {
- "contentLength": 0,
- "language": "string",
- "sections": "string",
- "summary": "string"
}, - "preferences": {
- "tone": "string",
- "styleguide": "string"
}
}
]
}
Generate new Lilt Create content
Generate new Lilt Create content with the given parameters.
Example CURL:
curl --X --request 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:
Request Body schema: application/jsonrequired
Input parameters that determine what content will be generated.
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
- Payload
{- "language": "string",
- "template": "string",
- "templateParams": {
- "contentLength": 0,
- "language": "string",
- "sections": "string",
- "summary": "string"
}, - "preferences": {
- "tone": "string",
- "styleguide": "string"
}
}
Update Lilt Create preferences
Update the stored preferences for Lilt Create.
Example CURL:
curl --X --request PUT
'https://api.lilt.com/v2/create/preferences?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"tone": "formal", "styleguide": ""}'
Authorizations:
Request Body schema: application/jsonoptional
Which styleguide to use.
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
- Payload
{- "language": "string",
- "template": "string",
- "templateParams": {
- "contentLength": 0,
- "language": "string",
- "sections": "string",
- "summary": "string"
}, - "preferences": {
- "tone": "string",
- "styleguide": "string"
}
}
Get Lilt Create content by ID.
Get Lilt Create content by ID.
Example CURL:
curl --X --request GET 'https://api.lilt.com/v2/create/1234?key=API_KEY'
Authorizations:
path Parameters
contentId required | integer The content ID. |
Responses
Response samples
- 200
{- "language": "string",
- "template": "string",
- "templateParams": {
- "contentLength": 0,
- "language": "string",
- "sections": "string",
- "summary": "string"
}, - "preferences": {
- "tone": "string",
- "styleguide": "string"
}
}
Update Lilt Create content
Update a piece of Lilt Create content.
Example CURL:
curl --X --request PUT 'https://api.lilt.com/v2/create/1234?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"language":"de-DE"}'
Authorizations:
path Parameters
contentId required | integer The content ID. |
Request Body schema: application/jsonoptional
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
- Payload
{- "language": "string",
- "template": "string",
- "templateParams": {
- "contentLength": 0,
- "language": "string",
- "sections": "string",
- "summary": "string"
}, - "preferences": {
- "tone": "string",
- "styleguide": "string"
}
}
Response samples
- 200
{- "language": "string",
- "template": "string",
- "templateParams": {
- "contentLength": 0,
- "language": "string",
- "sections": "string",
- "summary": "string"
}, - "preferences": {
- "tone": "string",
- "styleguide": "string"
}
}
Delete Lilt Create content
Delete a piece of Lilt Create content.
Example CURL:
curl --X --request DELETE 'https://api.lilt.com/v2/create/1234?key=API_KEY'
Authorizations:
path Parameters
contentId required | integer The content ID. |
Responses
Response samples
- 200
{- "id": 0
}
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:
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
- 200
- default
[- {
- "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": {
- "exactWords": 0,
- "fuzzyWords": 0,
- "newWords": 0,
- "numDeliveredProjects": 0,
- "numLanguagePairs": 0,
- "numProjects": 0,
- "percentReviewed": 0,
- "percentTranslated": 0,
- "projects": [
- {
- "id": 0,
- "srcLang": "en",
- "srcLocale": "US",
- "trgLang": "fr",
- "trgLocale": "CA",
- "name": "My new project",
- "due": "2021-10-03T13:43:00.000Z",
- "isComplete": false,
- "isArchived": false,
- "state": "inProgress",
- "numSourceTokens": 2134,
- "createdAt": "2021-04-01T13:43:00.000Z",
- "updatedAt": "2021-06-03T13:43:00.000Z",
- "isDeleted": false,
- "memoryId": 2134,
- "workflowStatus": "READY_TO_START",
- "workflowName": "Translate > Review > Analyst Review"
}
], - "sourceWords": 0,
- "uniqueLanguagePairs": 1,
- "uniqueLinguists": 1,
- "workflowStatus": "READY_TO_START"
}
}
]
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:
Request Body schema: application/jsonrequired
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 Identifier of the workflow template to be used when creating a job. If not passed the organization default will be used. |
workflowTemplateName | integer Name of the workflow template to be used, must be passed with teamId or look up will fail. If workflowTemplateId is passed it supercedes any other look up. |
Responses
Request samples
- Payload
{- "name": "My new Job",
- "languagePairs": [
- {
- "srcLang": "en",
- "srcLocale": "US",
- "trgLang": "de",
- "trgLocale": "DE",
- "dueDate": "2021-10-03T13:43:00.000Z",
- "memoryId": 1241,
- "externalModelId": 44,
- "pretranslate": true,
- "autoAccept": true,
- "caseSensitive": true,
- "takeMatchAttribution": true,
- "configId": 2332,
- "workflowTemplateId": 14,
- "workflowTemplateName": 0,
- "workflowStageAssignments": [
- {
- "workflowStageTemplateId": 12345,
- "userId": 123,
- "email": "username@domain.com"
}
]
}
], - "fileIds": [
- 298,
- 299
], - "due": "2021-10-05T14:48:00.000Z",
- "srcLang": "en",
- "srcLocale": "US",
- "isPlural": true,
- "workflowTemplateId": 123,
- "workflowTemplateName": 0
}
Response samples
- 200
- default
{- "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": {
- "exactWords": 0,
- "fuzzyWords": 0,
- "newWords": 0,
- "numDeliveredProjects": 0,
- "numLanguagePairs": 0,
- "numProjects": 0,
- "percentReviewed": 0,
- "percentTranslated": 0,
- "projects": [
- {
- "id": 0,
- "srcLang": "en",
- "srcLocale": "US",
- "trgLang": "fr",
- "trgLocale": "CA",
- "name": "My new project",
- "due": "2021-10-03T13:43:00.000Z",
- "isComplete": false,
- "isArchived": false,
- "state": "inProgress",
- "numSourceTokens": 2134,
- "createdAt": "2021-04-01T13:43:00.000Z",
- "updatedAt": "2021-06-03T13:43:00.000Z",
- "isDeleted": false,
- "memoryId": 2134,
- "workflowStatus": "READY_TO_START",
- "workflowName": "Translate > Review > Analyst Review"
}
], - "sourceWords": 0,
- "uniqueLanguagePairs": 1,
- "uniqueLinguists": 1,
- "workflowStatus": "READY_TO_START"
}
}
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:
path Parameters
jobId required | integer A job id. |
Responses
Response samples
- 200
- default
{- "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": {
- "exactWords": 0,
- "fuzzyWords": 0,
- "newWords": 0,
- "numDeliveredProjects": 0,
- "numLanguagePairs": 0,
- "numProjects": 0,
- "percentReviewed": 0,
- "percentTranslated": 0,
- "projects": [
- {
- "id": 0,
- "srcLang": "en",
- "srcLocale": "US",
- "trgLang": "fr",
- "trgLocale": "CA",
- "name": "My new project",
- "due": "2021-10-03T13:43:00.000Z",
- "isComplete": false,
- "isArchived": false,
- "state": "inProgress",
- "numSourceTokens": 2134,
- "createdAt": "2021-04-01T13:43:00.000Z",
- "updatedAt": "2021-06-03T13:43:00.000Z",
- "isDeleted": false,
- "memoryId": 2134,
- "workflowStatus": "READY_TO_START",
- "workflowName": "Translate > Review > Analyst Review"
}
], - "sourceWords": 0,
- "uniqueLanguagePairs": 1,
- "uniqueLinguists": 1,
- "workflowStatus": "READY_TO_START"
}
}
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:
path Parameters
jobId required | integer A job id. |
Request Body schema: application/jsonoptional
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
- Payload
{- "name": "My new Job",
- "dueDate": 0,
- "isProcessing": "ExportError",
- "processingErrorMsg": "Authentication failed. Check your Contentful API Key."
}
Response samples
- 200
- default
{- "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": {
- "exactWords": 0,
- "fuzzyWords": 0,
- "newWords": 0,
- "numDeliveredProjects": 0,
- "numLanguagePairs": 0,
- "numProjects": 0,
- "percentReviewed": 0,
- "percentTranslated": 0,
- "projects": [
- {
- "id": 0,
- "srcLang": "en",
- "srcLocale": "US",
- "trgLang": "fr",
- "trgLocale": "CA",
- "name": "My new project",
- "due": "2021-10-03T13:43:00.000Z",
- "isComplete": false,
- "isArchived": false,
- "state": "inProgress",
- "numSourceTokens": 2134,
- "createdAt": "2021-04-01T13:43:00.000Z",
- "updatedAt": "2021-06-03T13:43:00.000Z",
- "isDeleted": false,
- "memoryId": 2134,
- "workflowStatus": "READY_TO_START",
- "workflowName": "Translate > Review > Analyst Review"
}
], - "sourceWords": 0,
- "uniqueLanguagePairs": 1,
- "uniqueLinguists": 1,
- "workflowStatus": "READY_TO_START"
}
}
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:
path Parameters
jobId required | integer A job id. |
Responses
Response samples
- 200
- default
{- "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:
path Parameters
jobId required | integer A job id. |
Responses
Response samples
- 200
- default
{- "sourceWords": 0,
- "exactWords": 0,
- "fuzzyWords": 0,
- "newWords": 0,
- "projects": [
- {
- "id": 1,
- "sourceWords": 1000,
- "exactWords": 800,
- "fuzzyWords": 150,
- "newWords": 50
}
]
}
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:
path Parameters
jobId required | integer A job id. |
Responses
Response samples
- 200
- default
{- "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": {
- "exactWords": 0,
- "fuzzyWords": 0,
- "newWords": 0,
- "numDeliveredProjects": 0,
- "numLanguagePairs": 0,
- "numProjects": 0,
- "percentReviewed": 0,
- "percentTranslated": 0,
- "projects": [
- {
- "id": 0,
- "srcLang": "en",
- "srcLocale": "US",
- "trgLang": "fr",
- "trgLocale": "CA",
- "name": "My new project",
- "due": "2021-10-03T13:43:00.000Z",
- "isComplete": false,
- "isArchived": false,
- "state": "inProgress",
- "numSourceTokens": 2134,
- "createdAt": "2021-04-01T13:43:00.000Z",
- "updatedAt": "2021-06-03T13:43:00.000Z",
- "isDeleted": false,
- "memoryId": 2134,
- "workflowStatus": "READY_TO_START",
- "workflowName": "Translate > Review > Analyst Review"
}
], - "sourceWords": 0,
- "uniqueLanguagePairs": 1,
- "uniqueLinguists": 1,
- "workflowStatus": "READY_TO_START"
}
}
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:
path Parameters
jobId required | integer A job id. |
Responses
Response samples
- 200
- default
{- "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": {
- "exactWords": 0,
- "fuzzyWords": 0,
- "newWords": 0,
- "numDeliveredProjects": 0,
- "numLanguagePairs": 0,
- "numProjects": 0,
- "percentReviewed": 0,
- "percentTranslated": 0,
- "projects": [
- {
- "id": 0,
- "srcLang": "en",
- "srcLocale": "US",
- "trgLang": "fr",
- "trgLocale": "CA",
- "name": "My new project",
- "due": "2021-10-03T13:43:00.000Z",
- "isComplete": false,
- "isArchived": false,
- "state": "inProgress",
- "numSourceTokens": 2134,
- "createdAt": "2021-04-01T13:43:00.000Z",
- "updatedAt": "2021-06-03T13:43:00.000Z",
- "isDeleted": false,
- "memoryId": 2134,
- "workflowStatus": "READY_TO_START",
- "workflowName": "Translate > Review > Analyst Review"
}
], - "sourceWords": 0,
- "uniqueLanguagePairs": 1,
- "uniqueLinguists": 1,
- "workflowStatus": "READY_TO_START"
}
}
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:
path Parameters
jobId required | integer A job id. |
Responses
Response samples
- 200
- default
{- "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": {
- "exactWords": 0,
- "fuzzyWords": 0,
- "newWords": 0,
- "numDeliveredProjects": 0,
- "numLanguagePairs": 0,
- "numProjects": 0,
- "percentReviewed": 0,
- "percentTranslated": 0,
- "projects": [
- {
- "id": 0,
- "srcLang": "en",
- "srcLocale": "US",
- "trgLang": "fr",
- "trgLocale": "CA",
- "name": "My new project",
- "due": "2021-10-03T13:43:00.000Z",
- "isComplete": false,
- "isArchived": false,
- "state": "inProgress",
- "numSourceTokens": 2134,
- "createdAt": "2021-04-01T13:43:00.000Z",
- "updatedAt": "2021-06-03T13:43:00.000Z",
- "isDeleted": false,
- "memoryId": 2134,
- "workflowStatus": "READY_TO_START",
- "workflowName": "Translate > Review > Analyst Review"
}
], - "sourceWords": 0,
- "uniqueLanguagePairs": 1,
- "uniqueLinguists": 1,
- "workflowStatus": "READY_TO_START"
}
}
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:
path Parameters
jobId required | integer A job id. |
Responses
Response samples
- 200
- default
{- "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": {
- "exactWords": 0,
- "fuzzyWords": 0,
- "newWords": 0,
- "numDeliveredProjects": 0,
- "numLanguagePairs": 0,
- "numProjects": 0,
- "percentReviewed": 0,
- "percentTranslated": 0,
- "projects": [
- {
- "id": 0,
- "srcLang": "en",
- "srcLocale": "US",
- "trgLang": "fr",
- "trgLocale": "CA",
- "name": "My new project",
- "due": "2021-10-03T13:43:00.000Z",
- "isComplete": false,
- "isArchived": false,
- "state": "inProgress",
- "numSourceTokens": 2134,
- "createdAt": "2021-04-01T13:43:00.000Z",
- "updatedAt": "2021-06-03T13:43:00.000Z",
- "isDeleted": false,
- "memoryId": 2134,
- "workflowStatus": "READY_TO_START",
- "workflowName": "Translate > Review > Analyst Review"
}
], - "sourceWords": 0,
- "uniqueLanguagePairs": 1,
- "uniqueLinguists": 1,
- "workflowStatus": "READY_TO_START"
}
}
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:
path Parameters
jobId required | integer A job id. |
query Parameters
type required | string category for files and memory. |
Responses
Response samples
- default
{- "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:
path Parameters
jobId required | integer A job id. |
Responses
Response samples
- default
{- "message": "Internal server error."
}
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:
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 |
to_time | integer Unix time stamp (epoch, in seconds) of Projects with |
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 |
connector_id | integer A unique Connector identifier. |
Responses
Response samples
- 200
- default
[- {
- "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": {
- "connectorType": "github",
- "notes": "example metadata"
}, - "sample_review_percentage": 20,
- "created_at": 1489147692,
- "updated_at": 1489147692,
- "workflowStatus": "READY_TO_START",
- "document": [
- {
- "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": {
- "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
}
]
}
]
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:
Request Body schema: application/jsonrequired
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
- Payload
{- "name": "My new project",
- "memory_id": 1234,
- "job_id": 1234,
- "due_date": 1489147692,
- "metadata": {
- "connectorType": "github",
- "notes": "example metadata"
}, - "workflowTemplateId": 14
}
Response samples
- 200
- default
{- "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": {
- "connectorType": "github",
- "notes": "example metadata"
}, - "sample_review_percentage": 20,
- "created_at": 1489147692,
- "updated_at": 1489147692,
- "workflowStatus": "READY_TO_START",
- "document": [
- {
- "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": {
- "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
}
]
}
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:
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:
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 |
auto_accept | boolean An optional parameter to auto-accept segments with 100% translation
memory matches when the |
case_sensitive | boolean An optional parameter to use case sensitive translation memory matching when the |
match_attribution | boolean An optional parameter to attribute translation authorship of exact matches to the author of the file
when the |
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-streamrequired
The file contents to be uploaded. The entire POST body will be treated as the file.
Responses
Response samples
- 200
- default
{- "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": {
- "pretranslation": "idle"
}, - "translator_email": "translator@example.com",
- "reviewer_email": "reviewer@example.com",
- "created_at": 1489147692,
- "updated_at": 1489147692,
- "is_review_complete": true,
- "segments": [
- {
- "id": 84480010,
- "created_at": 1489147692,
- "updated_at": 1489147692,
- "document_id": 1234,
- "memory_id": 5678,
- "source": "The red bus.",
- "srclang": "en",
- "target": "Le bus rouge.",
- "trglang": "fr",
- "is_confirmed": true,
- "is_reviewed": true
}
]
}
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:
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
- 200
- default
[- {
- "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"
}
]
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:
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 |
labels | string Comma-separated list of labels to add to the uploaded document. |
Request Body schema: application/octet-streamrequired
The file contents to be uploaded. The entire POST body will be treated as the file.
Responses
Response samples
- 201
- default
{- "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:
query Parameters
id required | integer A unique File identifier. |
Responses
Response samples
- 204
- default
{- "id": 12345,
- "deleted": true
}
Add Label to File
Add a label to a File.
Example CURL:
curl --X --request POST 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1'
--header 'Content-Type: application/json' \
--data-raw '{
"name": "label_name"
}'
Authorizations:
query Parameters
id required | string A File id. |
Request Body schema: application/jsonrequired
A label name.
name | string The Label name. |
Responses
Request samples
- Payload
{- "name": "label_name"
}