Lilt REST API API Reference
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.
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.
API Endpoint
https://lilt.com/2
Contact: support@lilt.com
Request Content-Types: application/json
Response Content-Types: application/json
Schemes: https
Version: v2.0
Authentication
BasicAuth
ApiKeyAuth
Root
Retrieve the REST API root
This resource does not have any attributes. It lists the name of the REST API.
This endpoint can be used to verify REST API keys and to check the availability of the REST API.
A status object.
Unexpected error
Response Example (200 OK)
{
"api_name": "Lilt REST API v2",
"api_root": "/2"
}
Response Example (default )
{
"message": "Internal server error."
}
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://lilt.com/2/files?key=API_KEY&id=274
A unique File identifier.
A list of files.
Unauthorized.
File deleted.
Unexpected error.
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": 46530,
"name": "en_US.json",
"file_hash": "3858f62230ac3c915f300c664312c63f",
"export_uri": "https://example.com/export",
"detected_lang": "de",
"detected_lang_confidence": 0.7,
"created_at": 1489147692,
"updated_at": 1489147692
}
]
Response Example (default )
{
"message": "Internal server error."
}
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.
When uploading a file, any parameters needed to issue a request to the specified export_uri can be encoded in the export_uri itself as query parameters. Typical examples of parameters that may be required are an access token to authorize requests to a third-party HTTP API and the unique identifier of a resource available via the third-party HTTP API that corresponds to the file. An example export_uri that encodes a target resource identifier (i.e., source_id) of an associated resource behind a third party HTTP API is given in the CURL command below.
Example CURL command:
curl -X POST https://lilt.com/2/files?key=API_KEY&name=en_US.json&export_uri=https://example.com/export?source_id=12345 \
--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
.
The file contents to be uploaded. The entire POST body will be treated as the file.
A file name.
A webhook endpoint that will export the translated document back to the source repository.
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.
Flag indicating whether to perform language detection on the uploaded file. Default is false.
Request Content-Types: application/octet-stream
Request Example
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<xliff xmlns=\"urn:oasis:names:tc:xliff:document:1.2\">\n...\n</xliff>"
Response Example (201 Created)
{
"id": 46530,
"name": "en_US.json",
"file_hash": "3858f62230ac3c915f300c664312c63f",
"export_uri": "https://example.com/export",
"detected_lang": "de",
"detected_lang_confidence": 0.7,
"created_at": 1489147692,
"updated_at": 1489147692
}
Response Example (default )
{
"message": "Internal server error."
}
Delete a File
Delete a File.
Example CURL command:
curl -X DELETE https://lilt.com/2/files?key=API_KEY&id=123 ```
A unique File identifier.
A status object.
Unexpected error
Response Example (204 No Content)
{
"id": 12345,
"deleted": true
}
Response Example (default )
{
"message": "Internal server error."
}
Connectors
Retrieve a Connector
Retrieves one or more connectors available to your user. Connectors are not associated with a project or a memory.
To retrieve a specific connector, specify the id request parameter. To retrieve all connectors, omit the id request parameter.
Example CURL command: curl -X GET https://lilt.com/2/connectors?key=API_KEY&id=274
A unique Connector identifier.
A list of Connectors.
Unauthorized.
Connector deleted.
Unexpected error.
Response Example (200 OK)
[
{
"id": "integer",
"name": "string",
"schedule": "string",
"last_check": "string",
"healthy": "boolean",
"args": "object",
"created_at": "string",
"updated_at": "string"
}
]
Response Example (default )
{
"message": "Internal server error."
}
Upload a Connector
Create a new connector linked to a supported external cms.
Connector arguments.
- name: string
-
Name of connector.
- args: object
-
Connector parameters.
- schedule: string
-
Cron string
Request Content-Types: application/json
Request Example
{
"name": "string",
"args": "object",
"schedule": "0 0 * * *"
}
Response Example (201 Created)
{
"id": "integer",
"name": "string",
"schedule": "string",
"last_check": "string",
"healthy": "boolean",
"args": "object",
"created_at": "string",
"updated_at": "string"
}
Response Example (default )
{
"message": "Internal server error."
}
Upload a Connector
Create a new connector linked to a supported external content source.
Connector arguments.
- id: integer
-
A unique Connector identifier.
- name: string
-
Name of connector.
- args: object
-
Connector parameters.
- schedule: string
-
Cron string
Request Content-Types: application/json
Request Example
{
"id": 46530,
"name": "zendesk",
"args": "object",
"schedule": "0 0 * * *"
}
Response Example (201 Created)
{
"id": "integer",
"name": "string",
"schedule": "string",
"last_check": "string",
"healthy": "boolean",
"args": "object",
"created_at": "string",
"updated_at": "string"
}
Response Example (default )
{
"message": "Internal server error."
}
Delete a Connector
Delete a Connector.
Example CURL command:
curl -X DELETE https://lilt.com/2/connectors?key=API_KEY&id=123 ```
A unique Connector identifier.
A status object.
Unexpected error
Response Example (204 No Content)
{
"id": 12345,
"deleted": true
}
Response Example (default )
{
"message": "Internal server error."
}
Sync a Connector
Request an import job for the given connector ID. This will check the target system for new content to pull into Lilt.
Example CURL command:
curl -X GET https://lilt.com/2/connectors/sync?key=API_KEY&id=128
A unique Connector identifier.
A Connector Job object.
Unexpected error
Response Example (201 Created)
{
"id": "integer",
"status": "string",
"args": "object",
"created_at": "string",
"updated_at": "string"
}
Response Example (default )
{
"message": "Internal server error."
}
Retreive a Connector Job
Retrieves a connector job available to your user. Use this to check the status of jobs started by the /connectors/sync
and /connectors/jobs/deliver
endpoints.
Example CURL command:
curl -X GET https://lilt.com/2/connectors/jobs?key=API_KEY&id=9274
A unique Connector Job identifier.
A list of Connector Jobs.
Unexpected error
Response Example (200 OK)
[
{
"id": "integer",
"status": "string",
"args": "object",
"created_at": "string",
"updated_at": "string"
}
]
Response Example (default )
{
"message": "Internal server error."
}
Deliver a Connector Job
Request an export job for the given connector job ID. This will check Lilt for completed projects that are associated with this job and deliver them to the target system.
Example CURL command:
curl -X POST https://lilt.com/2/connectors/jobs/deliver?key=API_KEY&id=9274
A unique Connector Job identifier.
A success status code.
Unexpected error
Response Example (default )
{
"message": "Internal server error."
}
Documents
Create a Document
Create a new Document. A Document is a collection of one or more Segments. Documents are nested inside of Projects, and appear in the Project details view in the web app. Document-level relationships between Segments are considered by the machine translation system during adaptation. If there is no inherent document structure in your data, you still might consider grouping related Segments into Documents to improve translation quality.
The Document resource to create.
- name: string
-
The document name.
- project_id: integer
-
A unique Project identifier.
Request Content-Types: application/json
Request Example
{
"name": "Introduction.xliff",
"project_id": 23618
}
A Document object.
Unexpected error
Response Example (200 OK)
{
"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,
"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
}
]
}
Response Example (default )
{
"message": "Internal server error."
}
Retrieve a Document
List a Document.
The listing will include the pretranslation status for the document. When pretranslation is in progress for a document, the GET /documents
endpoint's response will include is_pretranslating = true
as well as a more detailed status property status.pretranslation
one of idle
, pending
, or running
.
A unique Document identifier.
Flag indicating whether full segment information should be returned.
A Document object.
Unexpected error
Response Example (200 OK)
{
"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,
"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
}
]
}
Response Example (default )
{
"message": "Internal server error."
}
Update a Document
Update a Document.
The Document resource to update.
- id: integer
-
A unique Document identifier.
- name: string
-
The Document name.
Request Content-Types: application/json
Request Example
{
"id": 46530,
"name": "Introduction to our App"
}
A Document object.
Unexpected error
Response Example (200 OK)
{
"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,
"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
}
]
}
Response Example (default )
{
"message": "Internal server error."
}
Delete a Document
Delete a Document.
A unique Document identifier.
A status object.
Unexpected error
Response Example (200 OK)
{
"id": 46530,
"deleted": true
}
Response Example (default )
{
"message": "Internal server error."
}
Pretranslate a Document
Initiate pretranslation of a list of Documents. This request will mark document(s) as being pretranslated. Pretranslation in this context is:
- Applying and confirming exact TM matches based on the Memory of the Project;
- Translating all other segments via MT without confirming them.
Example CURL command:
curl -X POST https://lilt.com/2/documents/pretranslate?key=API_KEY -d {"id": [123]} -H "Content-Type: application/json"
Document translation is an asynchronous process that, in effect, is performed in the background.
To check the status of pretranslation for a document, use the GET
/documents
endpoint. When pretranslation is in progress for a document, the GET /documents
endpoint's response will include is_pretranslating
= true
as well as a more detailed status property status.pretranslation
one of idle
, pending
, or running
.
Once pretranslation is finished, the document can be downloaded via GET
/documents/files
.
A list of unique Document identifiers.
- id: integer[]
-
A list of unique Document identifiers.
-
integer - auto_accept: boolean
-
Optional parameter for auto-accepting 100% TM hits.
- case_sensitive: boolean
-
Optional for using case matching against TM hits..
- attribute_to_creator: boolean
-
Optional parameter for attributing translation authorship of exact matches to document creator.
- mode: string
-
An optional parameter indicating how the document will be pretranslated.
The accepted values are
tm
, ortm+mt
. Default istm
.
Deprecated, use body param instead. Optional parameter for auto-accepting 100% TM hits.
Deprecated, use body param instead. Optional for using case matching against TM hits.
Deprecated, use body param instead. Optional parameter for attributing translation authorship of exact matches to document creator.
Deprecated, use body param instead. An optional parameter indicating how the document will be pretranslated.
The accepted values are tm
, or tm+mt
. Default is tm
.
Request Content-Types: application/json
Request Example
{
"id": [
123,
234
],
"auto_accept": false,
"case_sensitive": false,
"attribute_to_creator": false,
"mode": "tm+mt"
}
A status object.
Unexpected error
Response Example (202 Accepted)
{
"id": [
123,
234
],
"is_pretranslating": true,
"documents": [
{
"id": 123,
"import_in_progress": false,
"import_succeeded": true,
"import_error_message": "",
"is_processing": false,
"is_pretranslating": true,
"status": {
"pretranslation": "running"
}
}
]
}
Response Example (default )
{
"message": "Internal server error."
}
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://lilt.com/2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff
An unique Document identifier.
Download the document in XLIFF 1.2 format.
A file.
File in pretranslation.
Unexpected error
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"
Response Example (default )
{
"message": "Internal server error."
}
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://lilt.com/2/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
The file contents to be uploaded. The entire POST body will be treated as the file.
A file name.
A unique Project identifier.
An optional parameter indicating if and how the document will be pretranslated upon being uploaded.
The accepted values are null
, tm
, or tm+mt
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 or set to false
, no segments will be auto-accepted.
An optional pararameter to specify an import configuration to be applied when extracting translatable content from this file.
Request Content-Types: application/octet-stream
Request Example
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<xliff xmlns=\"urn:oasis:names:tc:xliff:document:1.2\">\n...\n</xliff>"
A Document object.
Unexpected error
Response Example (200 OK)
{
"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,
"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
}
]
}
Response Example (default )
{
"message": "Internal server error."
}
Unlock documents
Unlock documents for translation. Sets document "Translation Done" and "Review Done" to false.
Example curl:
curl --X --request POST 'https://lilt.com/2/documents/done/unlock?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"documentIds": [23921, 23922]
}'
document ids to update
- documentIds: number[]
-
array of document ids
Request Example
{
"documentIds": [
10641,
10642
]
}
array of updated documents
Response Example (200 OK)
"array"
Mark translation done
Mark the translation of documents as done/undone in bulk.
When being marked positively as done:
- Documents must not already be marked as done and all segments must be confirmed.
- This request will also trigger an email notification to a document's assigned reviewer that the document is ready for review.
When being marked as un-done:
- Documents must not be marked as complete for review.
Example curl:
curl --X --request POST 'https://lilt.com/2/documents/done/translation?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"documentIds": [23921, 23922],
"isDone": true
}'
document ids to update
- documentIds: number[]
-
array of document ids
- isDone: boolean
Request Example
{
"documentIds": [
10641,
10642
],
"isDone": true
}
array of updated documents
Response Example (200 OK)
"array"
Mark review done
Mark the review of documents as done/undone in bulk.
When being marked positively as done:
- Documents must not already be marked as done for review.
- Documents must already be marked as done for translation.
- This request will also trigger an email notification.
Example curl:
curl --X --request POST 'https://lilt.com/2/documents/done/review?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"documentIds": [23921, 23922],
"isDone": true
}'
document ids to update
- documentIds: number[]
-
array of document ids
- isDone: boolean
Request Example
{
"documentIds": [
10641,
10642
],
"isDone": true
}
array of updated documents
Response Example (200 OK)
"array"
Languages
Retrieve supported languages
Get a list of supported languages.
An object listing supported languages and their corresponding locales.
Unexpected error
Response Example (200 OK)
{
"source_to_target": {
"en": {
"da": true,
"de": true,
"fr": true,
"...": "..."
},
"...": "..."
},
"code_to_name": {
"aa": "Afar",
"ab": "Abkhazian",
"af": "Afrikaans",
"...": "..."
}
}
Response Example (default )
{
"message": "Internal server error."
}
Lexicon
Update a Lexicon
Update the Lexicon (Termbase as displayed in the ui) with a new term. The maximum source length is 250 characters.
The lexicon entry.
- memory_id: integer
-
A unique Memory identifier.
- source: string
-
The source side of the lexicon entry.
- target: string
-
The target side of the lexicon entry.
Request Content-Types: application/json
Request Example
{
"memory_id": 10641,
"source": "washing machine",
"target": "Waschmaschine"
}
A status object.
Unexpected error
Response Example (200 OK)
{
"memory_id": 46530,
"success": true
}
Response Example (default )
{
"message": "Internal server error."
}
Query a Lexicon
Query the Lexicon. The Lexicon is an editable termbase / concordance that is integrated with the Memory.
A unique Memory identifier.
An ISO 639-1 language code.
An ISO 639-1 language code.
The query term.
The maximum number of results to return.
A list of LexiconEntry objects.
Unexpected error
Response Example (200 OK)
[
{
"translations": [],
"examples": [
[
{
"source": "Waschmaschine",
"sourceDelimiters": [
"",
""
],
"target": [
"washing",
"machine"
],
"targetDelimiters": [
"",
" ",
""
],
"sourceSpan": {
"start": 0,
"length": 1
},
"targetSpan": {
"start": 1,
"length": 1
},
"similarity": 0,
"memoryId": 10641
}
]
]
}
]
Response Example (default )
{
"message": "Internal server error."
}
Memories
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.
The Memory resource to create.
- name: string
-
A name for the Memory.
- srclang: string
-
An ISO 639-1 language identifier.
- trglang: 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
Request Content-Types: application/json
Request Example
{
"name": "automotive",
"srclang": "en",
"trglang": "fr",
"srclocale": "US",
"trglocale": "FR"
}
Response Example (200 OK)
{
"id": 1234,
"srclang": "en",
"trglang": "fr",
"srclocale": "US",
"trglocale": "FR",
"name": "Acme Corp Support Content",
"version": 78,
"created_at": 1489147692,
"updated_at": 1489147692,
"num_segments": 1028,
"resources": [
"string"
]
}
Response Example (default )
{
"message": "Internal server error."
}
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).
An optional Memory identifier.
Response Example (200 OK)
[
{
"id": 1234,
"srclang": "en",
"trglang": "fr",
"srclocale": "US",
"trglocale": "FR",
"name": "Acme Corp Support Content",
"version": 78,
"created_at": 1489147692,
"updated_at": 1489147692,
"num_segments": 1028,
"resources": [
"string"
]
}
]
Response Example (default )
{
"message": "Internal server error."
}
Update the name of a Memory
Update a Memory.
The Memory resource to update.
- id: integer
-
A unique Memory identifier.
- name: string
-
The Memory name.
Request Content-Types: application/json
Request Example
{
"id": 7246,
"name": "Automotive Memory"
}
Response Example (200 OK)
{
"id": 1234,
"srclang": "en",
"trglang": "fr",
"srclocale": "US",
"trglocale": "FR",
"name": "Acme Corp Support Content",
"version": 78,
"created_at": 1489147692,
"updated_at": 1489147692,
"num_segments": 1028,
"resources": [
"string"
]
}
Response Example (default )
{
"message": "Internal server error."
}
Delete a Memory
Delete a Memory.
A unique Memory identifier.
A status object.
Unexpected error
Response Example (200 OK)
{
"id": 46530,
"deleted": true
}
Response Example (default )
{
"message": "Internal server error."
}
Query a Memory
Perform a translation memory query.
A unique Memory identifier.
A source query.
Maximum number of results to return.
A list of TranslationMemoryEntry objects.
Unexpected error
Response Example (200 OK)
[
{
"source": "The red bus.",
"target": "Le bus rouge.",
"score": 100,
"metadata": "object"
}
]
Response Example (default )
{
"message": "Internal server error."
}
Get-sync for a Memory
Get all or part of a memory in TMX 1.4b format. If the from_time
and/or to_time
are omitted, then all segments are returned. The parameter when
specifies on which date field from_time
and to_time
are matched. Possible values are created
(when the segment was originally created in the memory), updated
(when the segment was lastly updated), and deleted
(when the segment was deleted).
Example CURL command:
curl -X GET https://lilt.com/2/memories/sync?key=API_KEY&id=42 -o from_lilt.tmx
A unique Memory identifier.
Unix time stamp (epoch, in seconds) of the start of the Memory section.
Unix time stamp (epoch, in seconds) of the end of the Memory section.
The date field on which retrieved segments match from/to time stamps: created
, updated
, deleted
. If this parameter is omitted, then the whole Memory is returned.
A TMX 1.4b file.
Unexpected error
Response Content-Types: application/x-tmx
Response Example (200 OK)
"string (byte)"
Response Example (default )
{
"message": "Internal server error."
}
Insert-sync for a Memory
Inserts a TM in TMX 1.4b format into the Memory. Request parameters should be passed as JSON object with the header field LILT-API
.
Example CURL command:
curl -X POST https://lilt.com/2/memories/sync?key=API_KEY \
--header "LILT-API: {\"name\": \"my_memory.tmx\",\"id\": 42}" \
--header "Content-Type: application/octet-stream" \
--data-binary @my_memory.tmx
The file contents to be uploaded. The entire POST body will be treated as the file.
A unique Memory identifier.
Name of the TMX file.
Request Content-Types: application/octet-stream
Request Example
"string"
A status object.
Unexpected error
Response Example (200 OK)
{
"id": 123,
"num_updates": 107
}
Response Example (default )
{
"message": "Internal server error."
}
Update-sync for a Memory
Updates the Memory with given TMX file. Request parameters should be passed as JSON object with the header field LILT-API
. The number of segments returned by the from_time
, to_time
, when
parameters and the number of segments in the TMX file need to be identical.
Example CURL command:
curl -X PUT https://lilt.com/2/memories/sync?key=API_KEY \
--header "LILT-API: {\"name\": \"my_memory.tmx\", \"id\": 42, \"from_time\": 1491048000, \"to_time\": 1491049800, "when": "Updated"}" \
--header "Content-Type: application/octet-stream" \
--data-binary @my_memory.tmx
The file contents to be uploaded. The entire PUT body will be treated as the file.
A unique Memory identifier.
Unix time stamp (epoch, in seconds) of the start of the Memory section.
Unix time stamp (epoch, in seconds) of the end of the Memory section.
The date field on which retrieved segments match from/to time stamps: created
, updated
, deleted
.
Request Example
"string"
A status object.
Unexpected error
Response Example (200 OK)
{
"id": 123,
"num_updates": "num_updates"
}
Response Example (default )
{
"message": "Internal server error."
}
Delete-sync for a Memory
Deletes segments in the Memory matching the from_time
, to_time
and when
parameters.
Example CURL command:
curl -X DELETE https://lilt.com/2/memories/sync?key=API_KEY&id=42&from_time=1491048000&to_time=1491049800&when=created
A unique Memory identifier.
Unix time stamp (epoch, in seconds) of the start of the Memory section.
Unix time stamp (epoch, in seconds) of the end of the Memory section.
The date field on which retrieved segments match from/to time stamps: created
, updated
, deleted
.
A status object.
Unexpected error
Response Example (200 OK)
{
"id": 123,
"num_updates": 107
}
Response Example (default )
{
"message": "Internal server error."
}
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
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://lilt.com/2/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
The file contents to be uploaded. The entire POST body will be treated as the file.
A unique Memory identifier.
Name of the TM or termbase file.
Request Content-Types: application/octet-stream
Request Example
"string"
A status object.
Unexpected error
Response Example (200 OK)
{
"id": 123,
"isProcessing": 1
}
Response Example (default )
{
"message": "Internal server error."
}
Projects
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.
The Project resource to create.
- name: string
-
A name for the Project.
- memory_id: integer
-
The Memory to associate with this new Project.
- file_ids: integer[]
-
A list of Files to add to this new Project.
-
integer - 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.
Request Content-Types: application/json
Request Example
{
"name": "My new project",
"memory_id": 1234,
"file_ids": [
123,
124,
125
],
"due_date": 1489147692,
"metadata": {
"connectorType": "github",
"notes": "example metadata"
}
}
Response Example (200 OK)
{
"id": 448,
"memory_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,
"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",
"created_at": 1489147692,
"updated_at": 1489147692
}
]
}
Response Example (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 or a list of all available projects.
To retrieve a specific project, specify the id
request parameter. 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.
A unique Project identifier.
An ISO 639-1 language code.
An ISO 639-1 language code.
Unix time stamp (epoch, in seconds) of Projects with created_at
greater than or equal to the value.
Unix time stamp (epoch, in seconds) of Projects with created_at
less than the value.
A project state (backlog, inProgress, inReview, inQA, done).
A flag that toggles whether to include archived projects in the response (the default is true
).
A unique Connector identifier.
Response Example (200 OK)
[
{
"id": 448,
"memory_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,
"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",
"created_at": 1489147692,
"updated_at": 1489147692
}
]
}
]
Response Example (default )
{
"message": "Internal server error."
}
Update a Project
Update a Project.
The Project resource to update.
- id: integer
-
A unique Project identifier.
- name: string
-
The Project name.
- state: string
-
The project's state. The possible states are 'backlog', 'inProgress', 'inReview', 'inQA', and 'done'
- due_date: integer
-
The due date. Measured in seconds since the Unix epoch.
- archived: boolean
-
True if the project is archived. Otherwise, false.
- metadata: object
-
Metadata associated with a project. This field must be valid JSON.
- sample_review_percentage: integer
-
The Project's sample review percentage. Must be an integer between 10 and 100, a multiple of 10 and greater than minimum value (displayed in error message).
Request Content-Types: application/json
Request Example
{
"id": 1234,
"name": "Walker Percy Essays",
"state": "backlog",
"due_date": 1489147692,
"archived": false,
"metadata": {
"connectorType": "github",
"notes": "example metadata"
},
"sample_review_percentage": 20
}
Response Example (200 OK)
{
"id": 448,
"memory_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,
"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",
"created_at": 1489147692,
"updated_at": 1489147692
}
]
}
Response Example (default )
{
"message": "Internal server error."
}
Delete a Project
Delete a Project.
A unique Project identifier.
A status object.
Unexpected error
Response Example (200 OK)
{
"id": 46530,
"deleted": true
}
Response Example (default )
{
"message": "Internal server error."
}
Retrieve Project report
Get information about a project that can be used for quoting. This includes:
- A translation memory leverage report
- Word count
- Segment count
A unique Project identifier.
An object that represents a Project quote.
Unexpected error
Response Example (200 OK)
{
"id": 21902,
"num_source_words": 8000,
"num_words_new": 6039,
"num_segments_new": 151,
"num_words_repetition": 12,
"num_segments_repetition": 2980000,
"bands": [
{
"minimum_score": 94,
"maximum_score": 85,
"num_source_words": 151,
"num_segments": 12
}
],
"documents": [
{
"id": 21902,
"num_source_words": 8000,
"num_words_new": 6039,
"num_segments_new": 151,
"num_words_repetition": 12,
"num_segments_repetition": 2980000,
"bands": [
{
"minimum_score": 94,
"maximum_score": 85,
"num_source_words": 151,
"num_segments": 12
}
]
}
]
}
Response Example (default )
{
"message": "Internal server error."
}
Retrieve Project status
Retrieve the status of a Project.
A unique Project identifier.
An object that represents a Project status report.
Unexpected error
Response Example (200 OK)
{
"id": 21902,
"num_source_words": 6039,
"num_words_confirmed": 151,
"num_words_reviewed": 12,
"time_elapsed": 2980000,
"time_elapsed_translation": 33487,
"time_elapsed_research": 912348,
"time_elapsed_review": 66521,
"resources": [
{
"email": "joe.strummer@lilt.com",
"name": "Joe Strummer",
"num_words_confirmed": 151,
"num_words_new": 12,
"num_words_fuzzy": 24,
"num_words_exact": 56,
"num_words_reviewed": 182,
"time_elapsed": 1172000,
"time_elapsed_translation": 1172000,
"time_elapsed_research": 1172000,
"time_elapsed_review": 1172000,
"num_segments_confirmed": 25,
"num_segments_reviewed": 30
}
]
}
Response Example (default )
{
"message": "Internal server error."
}
QA
Perform QA check
Perform QA checks on a target string. Optionally, you can specify a source string for additional bilingual checks, e.g. number consistency.
A target string to be checked.
An ISO 639-1 language code.
An optional source string.
An ISO 639-1 language code.
A QARuleMatches object.
Unexpected error
Response Example (200 OK)
{
"matches": [
{
"context": {
"length": 7,
"offset": 19,
"text": "This segment has a speling mistake"
},
"length": 7,
"message": "Possible spelling mistake found",
"offset": 19,
"replacements": [
{
"value": "spelling"
},
{
"value": "spewing"
},
{
"value": "spieling"
}
],
"rule": {
"category": {
"id": "TYPOS",
"name": "Possible Typo"
},
"description": "Possible spelling mistake",
"id": "MORFOLOGIK_RULE_EN_US",
"issueType": "misspelling",
"subId": "",
"urls": []
},
"shortMessage": "Spelling mistake"
}
]
}
Response Example (default )
{
"message": "Internal server error."
}
Segments
Create a Segment
Create a Segment and add it to a Memory. A Segment is a source/target pair that is used to train the machine translation system and populate the translation memory. This is not intended to be used on documents and will throw an error.
The maximum source length is 5,000 characters.
The Segment resource to create.
To add a Segment to a Memory, include the memory_id
and target
parameters.
To add a Segment to a Document, include the document_id
and the source
parameters. The target
parameter is optional.
- memory_id: integer
-
A unique Memory identifier.
- document_id: integer
-
A unique Document identifier.
- source: string
-
The source string.
- target: string
-
The target string.
Request Content-Types: application/json
Request Example
{
"memory_id": 10641,
"document_id": 1876,
"source": "Code zur Fehleranalyse einschalten",
"target": "Enable debugging code"
}
Response Example (200 OK)
{
"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
}
Response Example (default )
{
"message": "Internal server error."
}
Retrieve a Segment
Retrieve a Segment.
A unique Segment identifier.
Include comments in the response.
A Segment object.
Unexpected error
Response Example (200 OK)
{
"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,
"comments": [
{
"id": 84480010,
"text": "This is incorrect.",
"user_id": 5678,
"is_resolved": true,
"annotations": [
{
"text": "mistranslation"
}
],
"created_at": 1489147692
}
]
}
Response Example (default )
{
"message": "Internal server error."
}
Update a Segment
Update a Segment in memory. The Memory will be updated with the new target string.
The Segment resource to update.
- id: integer
-
A unique Segment identifier.
- target: string
-
The target string.
Request Content-Types: application/json
Request Example
{
"id": 84480010,
"target": "Enable debug code"
}
Response Example (200 OK)
{
"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
}
Response Example (default )
{
"message": "Internal server error."
}
Delete a Segment
Delete a Segment from memory. This will not delete a segment from a document.
A unique Segment identifier.
A status object.
Unexpected error
Response Example (200 OK)
{
"id": 46530,
"deleted": true
}
Response Example (default )
{
"message": "Internal server error."
}
Tag a Segment
Project tags for a segment. The source_tagged
string contains one or more SGML tags. The target
string is untagged. This endpoint will automatically place the source tags in the target.
Usage charges apply to this endpoint for production REST API keys.
The tagged source string.
The target string.
A unique Memory identifier.
A TaggedSegment object.
Unexpected error
Response Example (200 OK)
{
"source_tagged": "The <b>red bus.</b>",
"target_tagged": "Le <b>bus rouge.</b>"
}
Response Example (default )
{
"message": "Internal server error."
}
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.
A unique Memory identifier.
The source text to be translated.
A source hash code.
A target prefix.
Return top n translations (deprecated).
Returns rich translation information (e.g., with word alignments).
Include translation memory fuzzy matches.
Project tags. Projects tags in source to target if set to true.
A TranslationList object.
Unexpected error
Response Example (200 OK)
{
"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"
}
]
]
}
Response Example (default )
{
"message": "Internal server error."
}
Register a segment
Register a source string for interactive translation. The source_hash
value that is returned by this request is required by the prefix
parameter for the translation endpoint. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys.
A source string to be registered.
An ISO 639-1 language code.
An ISO 639-1 language code.
A status object.
Unexpected error
Response Example (200 OK)
{
"source_hash": 11476,
"num_words": 88
}
Response Example (default )
{
"message": "Internal server error."
}
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://lilt.com/2/translate/file?fileId=583&memoryId=2495' \
--header 'Authorization: Basic API_KEY='
List of File ids to be translated, comma separated.
Id of Memory to use in translation.
Translation info
Unexpected error
Response Example (200 OK)
{
"id": 1,
"fileId": "2,",
"status": "InProgress",
"createdAt": 1609357135
}
Response Example (default )
{
"message": "Internal server error."
}
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://lilt.com/2/translate/file?translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' \
--header 'Authorization: Basic API_KEY='
List of translation ids, comma separated
One of the translation statuses - InProgress
, Completed
, Failed
, ReadyForDownload
Results after this time (inclusive) will be returned, specified as seconds since the Unix epoch.
Results before this time (exclusive) will be returned, specified as seconds since the Unix epoch.
Translation info
Unexpected error
Response Example (200 OK)
{
"id": 1,
"fileId": "2,",
"status": "InProgress",
"createdAt": 1609357135
}
Response Example (default )
{
"message": "Internal server error."
}
Download translated file
Download a translated File.
Example CURL:
curl --X --request GET 'https://lilt.com/2/translate/files?id=1' \
--header 'Authorization: Basic API_KEY='
A translation id.
A file.
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"
Schema Definitions
TranslationInfo: object
Information describing a batch translation process.
- id: integer
-
Unique identifier for this translation.
- fileId: integer
-
id of the File that is being translated.
- status: string
-
Status of the translation -
InProgress
,ReadyForDownload
,Completed
,Failed
. - createdAt: integer
-
Time when this translation was started, in seconds since the Unix epoch.
- errorMsg: string
-
Error message, present when status is
Failed
.
Example
{
"id": 1,
"fileId": "2,",
"status": "InProgress",
"createdAt": 1609357135
}
Error: object
Response in the event of an unexpected error.
- message: object
-
A human-readable message describing the error.
Example
{
"message": "Internal server error."
}
Connector: object
A Connector is a Lilt managed api bridge between a content source and Lilt services.
- id: integer
- name: string
- schedule: string
- last_check: string
- healthy: boolean
- args: object
- created_at: string
- updated_at: string
Example
{
"id": "integer",
"name": "string",
"schedule": "string",
"last_check": "string",
"healthy": "boolean",
"args": "object",
"created_at": "string",
"updated_at": "string"
}
ConnectorJob: object
A ConnectorJob tracks the status of an import or export action.
- id: integer
- status: string
- args: object
- created_at: string
- updated_at: string
Example
{
"id": "integer",
"status": "string",
"args": "object",
"created_at": "string",
"updated_at": "string"
}
Project: object
A Project is a collection of zero or more Documents. It is specific to a language pair, and is associated with exactly one Memory for that language pair. The Memory association cannot be changed after the Project is created.
- id: integer
-
A unique number identifying the Project.
- memory_id: integer
-
A unique number identifying the associated Memory.
- srclang: string
-
An ISO 639-1 language identifier.
- trglang: string
-
An ISO 639-1 language identifier.
- srclocale: string
-
A locale identifier, supported for srclang.
- trglocale: string
-
A locale identifier, supported for trglang.
- name: string
-
A name for the project.
- state: string
-
The project's state. The possible states are
backlog
,inProgress
,inReview
,inQA
, anddone
. - due_date: integer
-
The due date. Measured in seconds since the Unix epoch.
- archived: boolean
-
The archived state of the Project.
- metadata: object
-
A JSON object of key/value string pairs. Stores custom project information.
- sample_review_percentage: integer
-
The project's sample review percentage.
- created_at: integer
-
Time at which the object was created. Measured in seconds since the Unix epoch.
- updated_at: integer
-
Time at which the object was created. Measured in seconds since the Unix epoch.
- document: DocumentWithoutSegments
-
A list of Documents.
-
DocumentWithoutSegments
Example
{
"id": 448,
"memory_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,
"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",
"created_at": 1489147692,
"updated_at": 1489147692
}
]
}
ProjectQuote: object
Quoting information for a Project.
- id: integer
-
A unique Project identifier.
- num_source_words: integer
-
The number of source words in the Project.
- num_words_new: integer
-
The number of new source words in the Project.
- num_segments_new: integer
-
The number of new segments in the Project.
- num_words_repetition: integer
-
The number of repetition source words in the Project.
- num_segments_repetition: integer
-
The number of repetition segments in the Project.
- bands: MatchBand
-
A list of MatchBand objects that represent translation memory leverage statistics.
-
MatchBand - documents: DocumentQuote
-
A list of DocumentQuote objects that quotes information for a Document.
-
DocumentQuote
Example
{
"id": 21902,
"num_source_words": 8000,
"num_words_new": 6039,
"num_segments_new": 151,
"num_words_repetition": 12,
"num_segments_repetition": 2980000,
"bands": [
{
"minimum_score": 94,
"maximum_score": 85,
"num_source_words": 151,
"num_segments": 12
}
],
"documents": [
{
"id": 21902,
"num_source_words": 8000,
"num_words_new": 6039,
"num_segments_new": 151,
"num_words_repetition": 12,
"num_segments_repetition": 2980000,
"bands": [
{
"minimum_score": 94,
"maximum_score": 85,
"num_source_words": 151,
"num_segments": 12
}
]
}
]
}
DocumentQuote: object
Quoting information for a Document.
- id: integer
-
A unique Document identifier.
- num_source_words: integer
-
The number of source words in the Document.
- num_words_new: integer
-
The number of new source words in the Document.
- num_segments_new: integer
-
The number of new segments in the Document.
- num_words_repetition: integer
-
The number of repetition source words in the Document.
- num_segments_repetition: integer
-
The number of repetition segments in the Document.
- bands: MatchBand
-
A list of MatchBand objects that represent translation memory leverage statistics.
-
MatchBand
Example
{
"id": 21902,
"num_source_words": 8000,
"num_words_new": 6039,
"num_segments_new": 151,
"num_words_repetition": 12,
"num_segments_repetition": 2980000,
"bands": [
{
"minimum_score": 94,
"maximum_score": 85,
"num_source_words": 151,
"num_segments": 12
}
]
}
MatchBand: object
A translation memory match band.
- minimum_score: integer
-
The minimum fuzzy match score.
- maximum_score: integer
-
The maximum fuzzy match score.
- num_source_words: integer
-
The number of source words in the band.
- num_segments: integer
-
The number of source segments in the band.
Example
{
"minimum_score": 94,
"maximum_score": 85,
"num_source_words": 151,
"num_segments": 12
}
ProjectStatus: object
The status of a Project.
- id: integer
-
A unique Project identifier.
- num_source_words: integer
-
The number of source words in the Project.
- num_words_confirmed: integer
-
The number of confirmed source words.
- num_words_reviewed: integer
-
The number of reviewed source words.
- time_elapsed: integer
-
The total time spent on the project by all resources. Measured in milliseconds.
- time_elapsed_translation: integer
-
The total time spent on translation by all resources. Measured in milliseconds.
- time_elapsed_research: integer
-
The total time spent on research by all resources. Measured in milliseconds.
- time_elapsed_review: integer
-
The total time spent on reviewing by all resources. Measured in milliseconds.
- resources: ResourceStatus
-
A list of ResourceStatus objects that represent per-resource statistics.
-
ResourceStatus
Example
{
"id": 21902,
"num_source_words": 6039,
"num_words_confirmed": 151,
"num_words_reviewed": 12,
"time_elapsed": 2980000,
"time_elapsed_translation": 33487,
"time_elapsed_research": 912348,
"time_elapsed_review": 66521,
"resources": [
{
"email": "joe.strummer@lilt.com",
"name": "Joe Strummer",
"num_words_confirmed": 151,
"num_words_new": 12,
"num_words_fuzzy": 24,
"num_words_exact": 56,
"num_words_reviewed": 182,
"time_elapsed": 1172000,
"time_elapsed_translation": 1172000,
"time_elapsed_research": 1172000,
"time_elapsed_review": 1172000,
"num_segments_confirmed": 25,
"num_segments_reviewed": 30
}
]
}
ResourceStatus: object
The status of a resource working on a Project.
- email: string
-
An email address.
- name: string
-
The full name.
- num_words_confirmed: integer
-
The number of source words confirmed.
- num_words_new: integer
-
The number of new source words confirmed.
- num_words_fuzzy: integer
-
The number of fuzzy match source words confirmed.
- num_words_exact: integer
-
The number of exact match source words confirmed.
- num_words_reviewed: integer
-
The number of source words reviewed.
- time_elapsed: integer
-
The total time spent on translation and research. Measured in milliseconds.
- time_elapsed_translation: integer
-
The total time spent translating. Measured in milliseconds.
- time_elapsed_research: integer
-
The total time spent on research. Measured in milliseconds.
- time_elapsed_review: integer
-
The total time spent reviewing. Measured in milliseconds.
- num_segments_confirmed: integer
-
The number of source segments confirmed.
- num_segments_reviewed: integer
-
The number of source segments reviewed.
Example
{
"email": "joe.strummer@lilt.com",
"name": "Joe Strummer",
"num_words_confirmed": 151,
"num_words_new": 12,
"num_words_fuzzy": 24,
"num_words_exact": 56,
"num_words_reviewed": 182,
"time_elapsed": 1172000,
"time_elapsed_translation": 1172000,
"time_elapsed_research": 1172000,
"time_elapsed_review": 1172000,
"num_segments_confirmed": 25,
"num_segments_reviewed": 30
}
File: object
A File is an unprocessed source file that can later be added to a project.
- id: integer
-
A unique number identifying the File.
- name: string
-
The file name.
- file_hash: string
-
A unique hash value associated with the file. An MD5 hash of the file content will be used by default.
- export_uri: string
-
A webhook endpoint that will export the translated document back to the source repository.
- detected_lang: string
-
Language associated with the file.
- detected_lang_confidence: number
-
Confidence score for the language associated with the file.
- created_at: integer
-
Time at which the object was created. Measured in seconds since the Unix epoch.
- updated_at: integer
-
Time at which the object was created. Measured in seconds since the Unix epoch.
Example
{
"id": 46530,
"name": "en_US.json",
"file_hash": "3858f62230ac3c915f300c664312c63f",
"export_uri": "https://example.com/export",
"detected_lang": "de",
"detected_lang_confidence": 0.7,
"created_at": 1489147692,
"updated_at": 1489147692
}
DocumentWithoutSegments: object
A Document is a collection of zero or more Segments.
- id: integer
-
A unique number identifying the Document.
- project_id: integer
-
A unique number identifying the Project.
- srclang: string
-
An ISO 639-1 language identifier.
- trglang: string
-
An ISO 639-1 language identifier.
- name: string
-
The document name.
- import_in_progress: boolean
-
True if the document is currently being imported
- import_succeeded: boolean
-
True if the import process succeeded.
- import_error_message: string
-
Error message if
import_succeeded=false
- export_in_progress: boolean
-
True if the document is currently being exported for download
- export_succeeded: boolean
-
True if the export process succeeded.
- export_error_message: string
-
Error message if
export_succeeded=false
- is_pretranslating: boolean
-
True if the document is currently being pretranslated.
- status: object
-
A list of translations for the query term.
-
- pretranslation: string idle, pending, running
- translator_email: string
-
The email of the assigned translator.
- reviewer_email: string
-
The email of the assigned reviewer.
- created_at: integer
-
Time at which the object was created. Measured in seconds since the Unix epoch.
- updated_at: integer
-
Time at which the object was created. Measured in seconds since the Unix epoch.
Example
{
"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
}
DocumentWithSegments: object
A Document is a collection of zero or more Segments.
- id: integer
-
A unique number identifying the Document.
- project_id: integer
-
A unique number identifying the Project.
- srclang: string
-
An ISO 639-1 language identifier.
- trglang: string
-
An ISO 639-1 language identifier.
- name: string
-
The document name.
- import_in_progress: boolean
-
True if the document is currently being imported
- import_succeeded: boolean
-
True if the import process succeeded.
- import_error_message: string
-
Error message if
import_succeeded=false
- export_in_progress: boolean
-
True if the document is currently being exported for download
- export_succeeded: boolean
-
True if the export process succeeded.
- export_error_message: string
-
Error message if
export_succeeded=false
- is_pretranslating: boolean
-
True if the document is currently being pretranslated.
- status: object
-
A list of translations for the query term.
-
- pretranslation: string idle, pending, running
- translator_email: string
-
The email of the assigned translator.
- reviewer_email: string
-
The email of the assigned reviewer.
- created_at: integer
-
Time at which the object was created. Measured in seconds since the Unix epoch.
- updated_at: integer
-
Time at which the object was created. Measured in seconds since the Unix epoch.
- segments: Segment
-
A list of Segments.
-
Segment
Example
{
"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,
"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
}
]
}
LexiconEntry: object
An Lexicon entry for a source term or phrase.
- translations: object[]
-
A list of translations for the query term.
-
object - source: string
-
The source string.
- target: string
-
The target string.
- frequency: number
-
The frequency of the term in the Lexicon.
- memory_id: number
-
A unique Memory identifier. If this identifier is missing, then the term comes from the generic termbase.
- examples: object[]
-
A list of concordance examples for the query term.
-
object - source: string
-
The source string.
- sourceDelimiters: string[]
-
A format string that indicates, for each word, if the source word should be preceded by a space.
-
string - target: string
-
The target string
- targetDelimiters: string[]
-
A format string that indicates, for each word, if the target word should be preceded by a space.
-
string - sourceSpan: object
-
An object that indicates where the query term appears in the source.
-
- start: number
-
The zero-indexed start index when
source
is split on whitespace. - length: number
-
The length in words after
start
of the source query term.
- targetSpan: object
-
An object that indicates the location in the target of contiguous words that align with the source query.
-
- start: number
-
The zero-indexed start index when
target
is split on whitespace. - length: number
-
The length in words after
start
of the target aligned phrase.
- similarity: number
- memory_id: number
-
A unique Memory identifier. If this identifier is missing, then the term comes from the generic concordance.
Example
{
"translations": [],
"examples": [
[
{
"source": "Waschmaschine",
"sourceDelimiters": [
"",
""
],
"target": [
"washing",
"machine"
],
"targetDelimiters": [
"",
" ",
""
],
"sourceSpan": {
"start": 0,
"length": 1
},
"targetSpan": {
"start": 1,
"length": 1
},
"similarity": 0,
"memoryId": 10641
}
]
]
}
DocumentPretranslating: object
Document object for which pretranslation was requested.
- id: number
-
A status object indicating the pretranslation status.
- import_in_progress: boolean
-
Indicates that the document is being imported.
- import_succeeded: boolean
-
Indicates that the document was successfully imported.
- import_error_message: string
-
Indicates there was an error importing the document.
- is_processing: boolean
-
Indicates the document is being processed.
- is_pretranslating: boolean
-
Indicates the document is being pretranslated.
- status: object
-
A status object indicating the pretranslation status.
-
- pretranslation: string
Example
{
"id": 123,
"import_in_progress": false,
"import_succeeded": true,
"import_error_message": "",
"is_processing": false,
"is_pretranslating": true,
"status": {
"pretranslation": "running"
}
}
Memory: object
A Memory is a collection of parallel (source/target) segments from which a MT/TM model is trained. When a translator confirms a segment in the Interface, a parallel segment is added to the Memory. Parallel segments from existing translation memories and bitexts can also be added to the Memory via the REST API.
- id: integer
-
A unique number identifying the Memory.
- srclang: string
-
An ISO 639-1 language identifier.
- trglang: string
-
An ISO 639-1 language identifier.
- srclocale: string
-
An ISO 639-1 language identifier.
- trglocale: string
-
An ISO 639-1 language identifier.
- name: string
-
A name for the Memory.
- version: integer
-
The current version of the Memory, which is the number of updates since the memory was created.
- created_at: integer
-
Time at which the object was created. Measured in seconds since the Unix epoch.
- updated_at: integer
-
Time at which the object was created. Measured in seconds since the Unix epoch.
- num_segments: integer
-
The number of confirmed Segments incorporated into this Memory.
- resources: string[]
-
The resource files (translation memories and termbases) associated with this Memory.
-
string
Example
{
"id": 1234,
"srclang": "en",
"trglang": "fr",
"srclocale": "US",
"trglocale": "FR",
"name": "Acme Corp Support Content",
"version": 78,
"created_at": 1489147692,
"updated_at": 1489147692,
"num_segments": 1028,
"resources": [
"string"
]
}
Translation: object
A machine translation (MT) or a translation memory (TM) match of a source segment.
- target: string
-
The target string.
- targetWithTags: string
-
The target string with source tags projected into the target.
- align: string
-
"MT only: A whitespace delimited list of source-target alignment indices."
- provenance: string
-
Positive values indicate that the word is from the Memory, with contiguous identical entries (e.g., 2 2) indicating phrase matches. Negative contiguous values indicate entries from the Lexicon. 0 indicates a word from the background data.
- score: number
-
The score of the translation.
- isTMMatch: boolean
-
TM only: If true, indicates an exact translation memory match.
- targetDelimiters: string[]
-
A format string that indicates, for each word, if the word should be preceded by a space.
-
string - targetWords: string[]
-
The target string can be constructed by suffixing each
targetDelimiters
entry with its corresponding word intargetWords
and concatenating the constructed array. Please note that thetargetDelimiters
array has one more entry thantargetWords
array which is why the last entry in the array will be the last value oftargetDelimiters
. -
string
Example
[
{
"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"
}
]
TranslationList: object
An ranked list of translations and associated metadata.
- untokenizedSource: string
-
The untokenized source segment. Punctuation has not been separated from words.
- tokenizedSource: string
-
The tokenized source segment. Punctuation has been separated from words.
- sourceDelimiters: string[]
-
A format string that indicates, for each word, if the word should be preceded by a space.
-
string - translation: Translation
-
A list of Translation objects.
-
Translation
Example
{
"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"
}
]
]
}
Segment: object
A Segment is a source string and, optionally, its translation. A Segment can be associated with both a Memory and a Document. The Segment object contains additional metadata about the source and target strings.
- id: integer
-
A unique number identifying the Segment.
- created_at: integer
-
Time at which the object was created. Measured in seconds since the Unix epoch.
- updated_at: integer
-
Time at which the object was created. Measured in seconds since the Unix epoch.
- document_id: integer
-
A unique Document identifier.
- memory_id: integer
-
The Memory with which this Segment is associated.
- source: string
-
The source string.
- srclang: string
-
An ISO 639-1 language code.
- target: string
-
The target string.
- trglang: string
-
An ISO 639-1 language code.
- is_confirmed: boolean
-
The confirmation status.
- is_reviewed: boolean
-
The review status.
Example
{
"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
}
SegmentWithComments: object
A Segment is a source string and, optionally, its translation. A Segment can be associated with both a Memory and a Document. The Segment object contains additional metadata about the source and target strings.
- id: integer
-
A unique number identifying the Segment.
- created_at: integer
-
Time at which the object was created. Measured in seconds since the Unix epoch.
- updated_at: integer
-
Time at which the object was created. Measured in seconds since the Unix epoch.
- document_id: integer
-
A unique Document identifier.
- memory_id: integer
-
The Memory with which this Segment is associated.
- source: string
-
The source string.
- srclang: string
-
An ISO 639-1 language code.
- target: string
-
The target string.
- trglang: string
-
An ISO 639-1 language code.
- is_confirmed: boolean
-
The confirmation status.
- is_reviewed: boolean
-
The review status.
- comments: Comment
-
A list of Comments.
-
Comment
Example
{
"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,
"comments": [
{
"id": 84480010,
"text": "This is incorrect.",
"user_id": 5678,
"is_resolved": true,
"annotations": [
{
"text": "mistranslation"
}
],
"created_at": 1489147692
}
]
}
Comment: object
A Comment is a translator's or a reviewer's comment on a segment.
- id: integer
-
A unique number identifying the Comment.
- text: string
-
The comment text.
- user_id: integer
-
The User who created this Comment.
- is_resolved: boolean
-
Whether the Comment is resolved.
- annotations: Annotation
-
A list of optional Annotations.
-
Annotation - created_at: integer
-
Time at which the object was created. Measured in seconds since the Unix epoch.
Example
{
"id": 84480010,
"text": "This is incorrect.",
"user_id": 5678,
"is_resolved": true,
"annotations": [
{
"text": "mistranslation"
}
],
"created_at": 1489147692
}
Annotation: object
A Comment's annotation.
- text: string
-
The Comment's annotation text.
Example
{
"text": "mistranslation"
}
TaggedSegment: object
A source string with tags automatically projected from source to target.
- source_tagged: string
-
The tagged source string.
- target_tagged: string
-
The tagged target string.
Example
{
"source_tagged": "The <b>red bus.</b>",
"target_tagged": "Le <b>bus rouge.</b>"
}
TranslationMemoryEntry: object
A translation memory entry.
- source: string
-
The source string.
- target: string
-
The target string. Tags will be automatically placed according to the query string.
- score: integer
-
The fuzzy match score.
- metadata: object
-
Attributes describing the translation memory entry.
Example
{
"source": "The red bus.",
"target": "Le bus rouge.",
"score": 100,
"metadata": "object"
}
QARuleMatches: object
QA rules describing the errors in the text.
- matches: object[]
-
object - context: object
-
- length: integer
-
The length of the error in characters in the context.
- offset: integer
-
The 0-based character offset of the error in the context text.
- text: string
-
Context of the error, i.e. the error and some text to the left and to the left.
- length: integer
-
The length of the error in characters.
- message: string
-
Message about the error displayed to the user.
- offset: integer
-
The 0-based character offset of the error in the text.
- replacements: object[]
-
Replacements that might correct the error. The array can be empty, in this case there is no suggested replacement.
-
object - value: string
-
the replacement string
- rule: object
-
- category: object
-
- id: string
-
A category's identifier that's unique for this language.
- name: string
-
A short description of the category.
- description: string
- id: string
-
An rule's identifier that's unique for this language.
- issueType: string
-
The Localization Quality Issue Type. This is not defined for all languages, in which case it will always be 'Uncategorized'.
- subId: string
-
An optional sub identifier of the rule, used when several rules are grouped.
- urls: object[]
-
An optional array of URLs with a more detailed description of the error.
-
object - value: string
-
the URL
- shortMessage: string
-
An optional shorter version of 'message'.
Example
{
"matches": [
{
"context": {
"length": 7,
"offset": 19,
"text": "This segment has a speling mistake"
},
"length": 7,
"message": "Possible spelling mistake found",
"offset": 19,
"replacements": [
{
"value": "spelling"
},
{
"value": "spewing"
},
{
"value": "spieling"
}
],
"rule": {
"category": {
"id": "TYPOS",
"name": "Possible Typo"
},
"description": "Possible spelling mistake",
"id": "MORFOLOGIK_RULE_EN_US",
"issueType": "misspelling",
"subId": "",
"urls": []
},
"shortMessage": "Spelling mistake"
}
]
}