LILT API

The LILT REST API enables programmatic access to LILT backend services: training of and translating with interactive adaptive machine translation, large-scale translation memory, the Lexicon termbase, programmatic control of the LILT CAT environment, translation memory synchronization, document and file translation, jobs, projects and segments, Lilt Create content generation, workflow templates, domains, uploads and webhook configuration. Requests and responses are JSON and the API responds only to HTTPS.

OpenAPI Specification

lilt-openapi-original.yml Raw ↑
openapi: 3.0.3
info:
  title: LILT API
  description: >
    LILT API Support: https://lilt.atlassian.net/servicedesk/customer/portals


    The LILT API enables programmatic access to the full-range of LILT backend
    services including:
      * Training of and translating with interactive, adaptive machine translation
      * Large-scale translation memory
      * The Lexicon (a large-scale termbase)
      * Programmatic control of the LILT CAT environment
      * Translation memory synchronization


    Requests and responses are in JSON format. The REST API only responds to
    HTTPS / SSL requests.


    The base url for this REST API is `https://api.lilt.com/`.


    ## Authentication


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


    Requests are authenticated using [HTTP Basic
    Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your
    API key as both the `username` and `password`.


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


    ## Quotas


    Our services have a general quota of 4000 requests per minute. Should you
    hit the maximum requests per minute, you will need to wait 60 seconds before
    you can send another request.
  version: v3.0.3
  license:
    name: LILT Platform Terms and Conditions
    url: https://lilt.com/lilt-platform-terms-and-conditions
servers:
  - url: https://api.lilt.com
security:
  - BasicAuth: []
  - ApiKeyAuth: []
paths:
  /v2/languages:
    get:
      tags:
        - Languages
      summary: Retrieve supported languages
      description: |+
        Get a list of supported languages.

      operationId: getLanguages
      responses:
        '200':
          description: >-
            An object listing supported languages and their corresponding
            locales.
          content:
            application/json:
              schema:
                title: LanguagesResponse
                type: object
                properties:
                  source_to_target:
                    type: object
                    properties: {}
                    description: >-
                      A two-dimensional object in which the first key is an ISO
                      639-1 language code indicating the source, and the second
                      key is an ISO 639-1 language code indicating the target.
                    example:
                      en:
                        da: true
                        de: true
                        fr: true
                        ...: ...
                      ...: ...
                  code_to_name:
                    type: object
                    properties: {}
                    description: >-
                      An object in which the key is an ISO 639-1 language code,
                      and the value is the language name.
                    example:
                      aa: Afar
                      ab: Abkhazian
                      af: Afrikaans
                      ...: ...
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v2/memories:
    get:
      tags:
        - Memories
      summary: Retrieve a Memory
      description: >+
        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).

      operationId: getMemory
      parameters:
        - name: id
          in: query
          description: An optional Memory identifier.
          schema:
            type: integer
      responses:
        '200':
          description: A list of Memory objects.
          content:
            application/json:
              schema:
                title: MemoryResponse
                type: array
                items:
                  $ref: '#/components/schemas/Memory'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Memory not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      tags:
        - Memories
      summary: Update the name of a Memory
      description: |
        Update a Memory.
      operationId: updateMemory
      requestBody:
        description: The Memory resource to update.
        content:
          application/json:
            schema:
              title: MemoryUpdateParameters
              required:
                - id
                - name
              type: object
              properties:
                id:
                  type: integer
                  description: A unique Memory identifier.
                  example: 7246
                name:
                  type: string
                  description: The Memory name.
                  example: Automotive Memory
        required: true
      responses:
        '200':
          description: A Memory object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Memory'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codegen-request-body-name: body
    post:
      tags:
        - Memories
      summary: Create a Memory
      description: |+
        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).

        <a href="/kb/introduction-to-lilt-translation" target=_blank>Refer
        to our KB</a> for a more detailed description.

      operationId: createMemory
      requestBody:
        description: The Memory resource to create.
        content:
          application/json:
            schema:
              title: MemoryCreateParameters
              required:
                - name
                - srclang
                - trglang
              type: object
              properties:
                name:
                  type: string
                  description: A name for the Memory.
                  example: automotive
                srclang:
                  type: string
                  description: An ISO 639-1 language identifier.
                  example: en
                trglang:
                  type: string
                  description: An ISO 639-1 language identifier.
                  example: fr
                srclocale:
                  type: string
                  description: An ISO 3166-1 region name for language locales
                  example: US
                trglocale:
                  type: string
                  description: An ISO 3166-1 region name for language locales
                  example: FR
        required: true
      responses:
        '200':
          description: A Memory object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Memory'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codegen-request-body-name: body
    delete:
      tags:
        - Memories
      summary: Delete a Memory
      description: |
        Delete a Memory.
      operationId: deleteMemory
      parameters:
        - name: id
          in: query
          description: A unique Memory identifier.
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: A status object.
          content:
            application/json:
              schema:
                title: MemoryDeleteResponse
                type: object
                properties:
                  id:
                    type: integer
                    description: A unique Memory identifier.
                    example: 46530
                  deleted:
                    type: boolean
                    description: >-
                      If the operation succeeded, then `true`. Otherwise,
                      `false`.
                    example: true
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v2/memories/query:
    get:
      tags:
        - Memories
      summary: Query a Memory
      description: |
        Perform a translation memory query.
      operationId: queryMemory
      parameters:
        - name: id
          in: query
          description: A unique Memory identifier.
          required: true
          schema:
            type: integer
        - name: query
          in: query
          description: A source query.
          required: true
          schema:
            type: string
        - name: 'n'
          in: query
          description: Maximum number of results to return.
          schema:
            type: integer
            default: 10
      responses:
        '200':
          description: A list of TranslationMemoryEntry objects.
          content:
            application/json:
              schema:
                title: MemoryQueryResponse
                type: array
                items:
                  $ref: '#/components/schemas/TranslationMemoryEntry'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v2/memories/import:
    post:
      tags:
        - Memories
      summary: File import for a Memory
      description: >+
        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:

        ```bash
          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.

        ```bash
          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
        ```

      operationId: importMemoryFile
      parameters:
        - name: memory_id
          in: header
          description: A unique Memory identifier.
          required: true
          schema:
            type: integer
        - name: name
          in: header
          description: Name of the TM or termbase file.
          required: true
          schema:
            type: string
        - name: sdlxliff_filters
          in: header
          description: Contains Filter information Unique to SDLXLIFF
          style: simple
          explode: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/SDLXLIFFFilter'
        - name: has_header_row
          in: header
          description: >-
            A flag indicating whether an imported Termbase CSV has a header row
            or not (the default value is `false`).
          schema:
            type: boolean
        - name: skip_duplicates
          in: header
          description: |
            A flag indicating whether or not to skip the import of segments
            which already exist in the memory. (the default value is `false`).
          schema:
            type: boolean
      requestBody:
        description: >-
          The file contents to be uploaded. The entire POST body will be treated
          as the file.
        content:
          application/octet-stream:
            schema:
              title: MemoryImportBody
              type: string
              format: binary
        required: true
      responses:
        '200':
          description: A status object.
          content:
            application/json:
              schema:
                title: MemoryImportResponse
                type: object
                properties:
                  id:
                    type: integer
                    description: A unique Memory identifier.
                    example: 123
                  isProcessing:
                    type: integer
                    description: The current state of the import.
                    example: 1
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codegen-request-body-name: body
  /v2/memories/termbase/export:
    post:
      tags:
        - Memories
      summary: Termbase export for a Memory
      description: |
        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.

        ```bash
          curl -X POST https://api.lilt.com/v2/memories/termbase/export?key=API_KEY&id=ID
        ```
      operationId: exportTermbase
      parameters:
        - name: id
          in: query
          description: A unique Memory identifier.
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: A status object.
          content:
            application/json:
              schema:
                title: TermbaseExportResponse
                type: object
                properties:
                  id:
                    type: integer
                    description: A unique Memory identifier.
                    example: 123
                  is_processing:
                    type: integer
                    description: The current state of the import.
                    example: 1
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v2/memories/termbase/download:
    get:
      tags:
        - Memories
      summary: Termbase download for a Memory
      description: |
        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.

        ```bash
          curl -X GET https://api.lilt.com/v2/memories/termbase/download?key=API_KEY&id=ID
        ```
      operationId: downloadTermbase
      parameters:
        - name: id
          in: query
          description: A unique Memory identifier.
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: A file.
          content:
            application/json:
              schema:
                title: TermbaseDownloadResponse
                type: string
                format: byte
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v2/memories/segment:
    delete:
      tags:
        - Memories
      summary: Delete a segment from a memory.
      description: |
        Delete a segment from a memory.

        ```bash
          curl -X DELETE https://api.lilt.com/v2/memories/segment?key=API_KEY&id=ID&segment_id=$SEGMENT_ID
        ```
      operationId: deleteSegmentFromMemory
      parameters:
        - name: id
          in: query
          description: A unique Memory identifier.
          required: true
          schema:
            type: integer
        - name: segment_id
          in: query
          description: A unique Segment identifier.
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: A success resposne.
          content:
            application/json:
              schema:
                title: DeleteSegmentFromMemoryResponse
                type: object
                properties:
                  success:
                    type: boolean
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v2/segments:
    post:
      description: >+
        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.

      operationId: createSegment
      requestBody:
        description: >
          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.
        required: true
        content:
          application/json:
            schema:
              title: SegmentCreateParameters
              type: object
              properties:
                memory_id:
                  description: A unique Memory identifier.
                  type: integer
                  example: 10641
                document_id:
                  description: A unique Document identifier.
                  type: integer
                  example: 1876
                source:
                  description: The source string.
                  type: string
                  example: Code zur Fehleranalyse einschalten
                target:
                  description: The target string.
                  type: string
                  example: Enable debugging code
                shouldApplySegmentation:
                  description: >-
                    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.
                  type: boolean
                srcLang:
                  description: >-
                    A two letter language code for the source language. Required
                    if `shouldApplySegmentation` is enabled.
                  type: string
                  example: fr
              required:
                - source
      responses:
        '200':
          description: A Segment object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Segment'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create a Segment
      tags:
        - Segments
    get:
      description: |+
        Retrieve a Segment.

      operationId: getSegment
      parameters:
        - description: A unique Segment identifier.
          in: query
          name: id
          required: true
          schema:
            type: integer
        - description: Include comments in the response.
          in: query
          name: include_comments
          schema:
            type: boolean
            default: false
          required: false
      responses:
        '200':
          description: A Segment object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Segment'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Retrieve a Segment
      tags:
        - Segments
    put:
      description: >+
        Update a Segment in memory. The Memory will be updated with the new
        target string.

      operationId: updateSegment
      requestBody:
        description: The Segment resource to update.
        content:
          application/json:
            schema:
              title: SegmentUpdateParameters
              type: object
              properties:
                id:
                  description: A unique Segment identifier.
                  type: integer
                  example: 84480010
                target:
                  description: The target string.
                  type: string
                  example: Enable debug code
              required:
                - id
                - target
        required: true
      responses:
        '200':
          description: A Segment object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Segment'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Update a Segment
      tags:
        - Segments
    delete:
      description: >
        Delete a Segment from memory. This will not delete a segment from a
        document.
      operationId: deleteSegment
      parameters:
        - description: A unique Segment identifier.
          in: query
          name: id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: A status object.
          content:
            application/json:
              schema:
                title: SegmentDeleteResponse
                type: object
                properties:
                  id:
                    description: A unique Segment identifier.
                    type: integer
                    example: 46530
                  deleted:
                    description: >-
                      If the operation succeeded, then `true`. Otherwise,
                      `false`.
                    type: boolean
                    example: true
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Delete a Segment
      tags:
        - Segments
  /v2/segments/review/unlock:
    post:
      description: >
        Unaccept and unlock segments.

        Sets individual segments' "Review Done" to false. Confirmed segments
        will remain confirmed.


        Example curl:

        ```
          curl --X --request POST 'https://lilt.com/2/segments/review/unlock?key=API_KEY' \
          --header 'Content-Type: application/json' \
          --data-raw '{
              "segmentIds": [23921, 23922]
          }'
        ```
      operationId: unlockSegments
      requestBody:
        description: segment ids to update
        required: true
        content:
          application/json:
            schema:
              title: SegmentDoneResponse
              type: object
              properties:
                segmentIds:
                  description: array of segment ids
                  type: array
                  example:
                    - 30032
                    - 30125
                  items:
                    type: number
              required:
                - segmentIds
      summary: Unaccept and unlock segments
      tags:
        - Segments
      responses:
        '200':
          description: array of updated segments
          content:
            application/json:
              schema:
                title: SegmentDoneResponse
                type: array
                items:
                  type: number
  /v2/segments/tag:
    get:
      description: >+
        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.

      operationId: tagSegment
      parameters:
        - description: The tagged source string.
          in: query
          name: source_tagged
          required: true
          schema:
            type: string
        - description: The target string.
          in: query
          name: target
          required: true
          schema:
            type: string
        - description: A unique Memory identifier.
          in: query
          name: memory_id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: A TaggedSegment object.
          content:
            application/json:
              schema:
                title: TaggedSegment
                type: object
                properties:
                  source_tagged:
                    type: string
                    description: The tagged source string.
                  target_tagged:
                    type: string
                    description: The tagged target string.
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Tag a Segment
      tags:
        - Segments
  /v2/translate:
    get:
      tags:
        - Translate
      summary: Translate a segment
      description: >+
        Translate a source string.


        Functionally identical to `POST /v2/translate`, with parameters passed

        as query string parameters instead of a JSON request body. Useful for

        simple integrations that prefer a GET request.


        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.


        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 API keys.

      operationId: translateSegmentGet
      parameters:
        - name: source
          in: query
          description: The source string to translate.
          schema:
            type: string
        - name: memory_id
          in: query
          description: A unique Memory identifier.
          required: true
          schema:
            type: integer
        - name: source_hash
          in: query
          description: A source hash code.
          schema:
            type: integer
        - name: 'n'
          in: query
          description: Return top n translations (deprecated).
          schema:
            type: integer
        - name: prefix
          in: query
          description: A target prefix.
          schema:
            type: string
        - name: rich
          in: query
          description: Returns rich translation information (e.g., with word alignments).
          schema:
            type: boolean
            default: false
        - name: tm_matches
          in: query
          description: Include translation memory fuzzy matches.
          schema:
            type: boolean
            default: true
        - name: project_tags
          in: query
          description: Project tags. Projects tags in source to target if set to true.
          schema:
            type: boolean
            default: false
        - name: contains_icu_data
          in: query
          description: >-
            Contains ICU data. If true then tags in the source following the ICU
            standard will be parsed and retained.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: A TranslationList object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TranslationList'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
        - Translate
      summary: Translate a segment
      description: >+
        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 API keys.

      operationId: translateSegmentPost
      requestBody:
        content:
          application/json:
            schema:
              title: TranslateSegmentBody
              required:
                - memory_id
              type: object
              properties:
                source:
                  type: string
                  description: A unique Segment identifier.
                memory_id:
                  type: integer
                  description: A unique Memory identifier.
                source_hash:
                  type: integer
                  description: A source hash code.
                'n':
                  type: integer
                  description: Return top n translations (deprecated).
                prefix:
                  type: string
                  description: A target prefix
                rich:
                  type: boolean
                  description: >-
                    Returns rich translation information (e.g., with word
                    alignments).
                  default: false
                tm_matches:
     

# --- truncated at 32 KB (169 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lilt/refs/heads/main/openapi/lilt-openapi-original.yml