v1

latestOpenAPI 3.0.3LILT Platform Terms and Conditions2026-07-26651658.7 KB
Segments

Create a Segment

Create a Segment and add it to a Memory or a Document. A Segment is a source/target pair that is used to train the machine translation system and populate the translation memory.

The maximum source length is 5,000 characters.

post/v2/segments

Request body

memory_idinteger

A unique Memory identifier.

document_idinteger

A unique Document identifier.

sourcestring required

The source string.

targetstring

The target string.

shouldApplySegmentationboolean

A flag for whether this segment should be broken down into smaller segments. If this is true then the response is an array of segments.

srcLangstring

A two letter language code for the source language. Required if shouldApplySegmentation is enabled.

Example request

{
  "memory_id": 10641,
  "document_id": 1876,
  "source": "Code zur Fehleranalyse einschalten",
  "target": "Enable debugging code",
  "srcLang": "fr"
}

Response

A Segment object.

idinteger

A unique number identifying the Segment.

created_atinteger

Time at which the object was created. Measured in seconds since the Unix epoch.

updated_atinteger

Time at which the object was created. Measured in seconds since the Unix epoch.

document_idinteger

A unique Document identifier.

memory_idinteger

The Memory with which this Segment is associated.

sourcestring

The source string.

srclangstring

An ISO 639-1 language code.

targetstring

The target string.

trglangstring

An ISO 639-1 language code.

is_confirmedboolean

The confirmation status.

is_reviewedboolean

The review status.

Example response

{
  "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
}