Lilt Uploads API

The Uploads API from Lilt — 7 operation(s) for uploads.

OpenAPI Specification

lilt-uploads-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: LILT Create Uploads API
  description: "LILT API Support: https://lilt.atlassian.net/servicedesk/customer/portals\n\nThe LILT API enables programmatic access to the full-range of LILT backend services including:\n  * Training of and translating with interactive, adaptive machine translation\n  * Large-scale translation memory\n  * The Lexicon (a large-scale termbase)\n  * Programmatic control of the LILT CAT environment\n  * Translation memory synchronization\n\n\nRequests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests.\n\nThe base url for this REST API is `https://api.lilt.com/`.\n\n## Authentication\n\nRequests are authenticated via API key, which requires the Business plan.\n\nRequests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your API key as both the `username` and `password`.\n\nFor 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.\n\n## Quotas\n\nOur 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.\n"
  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: []
tags:
- name: Uploads
paths:
  /v2/upload:
    get:
      summary: Get All Pending Uploads or specific list of uploads by ids or statuses
      description: "Retrieve all pending uploads for the current user and organization.\n\nExample CURL command:\n```\n  curl -X GET https://lilt.com/2/upload?key=API_KEY\n```\n"
      operationId: getPendingUploads
      parameters:
      - name: ids
        in: query
        required: false
        schema:
          type: string
        description: Comma-separated list of upload IDs to filter by.
      - name: statuses
        in: query
        required: false
        schema:
          type: string
        description: Comma-separated list of upload statuses to filter by.
      tags:
      - Uploads
      responses:
        '200':
          description: List of pending uploads.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: Unique upload identifier
                      example: 12345
                    filename:
                      type: string
                      description: Name of the uploaded file
                      example: document.xliff
                    status:
                      type: string
                      description: Current upload status
                      example: pending
                    created_at:
                      type: string
                      format: date-time
                      description: Upload creation timestamp
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v2/upload/{uploadId}:
    get:
      summary: Get Upload by ID
      description: "Retrieve a specific upload by its unique identifier.\n\nExample CURL command:\n```\n  curl -X GET https://lilt.com/2/upload/12345?key=API_KEY\n```\n"
      operationId: getUploadById
      tags:
      - Uploads
      parameters:
      - in: path
        name: uploadId
        description: Unique upload identifier
        required: true
        schema:
          type: integer
          minimum: 1
      responses:
        '200':
          description: Upload details.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    description: Unique upload identifier
                    example: 12345
                  filename:
                    type: string
                    description: Name of the uploaded file
                    example: document.xliff
                  status:
                    type: string
                    description: Current upload status
                    example: pending
                  created_at:
                    type: string
                    format: date-time
                    description: Upload creation timestamp
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v2/upload/s3/params:
    get:
      summary: Get S3 Upload Parameters
      description: "Get S3 upload parameters via query string. This endpoint provides the necessary information\nto complete the file upload process using GET parameters.\n\nExample CURL command:\n```\n  curl -X GET \"https://lilt.com/v2/upload/s3/params?key=API_KEY&filename=example.json&type=application/json&metadata.size=1024&metadata.labels=important,review-needed\"\n```\n"
      operationId: getS3UploadParams
      tags:
      - Uploads
      parameters:
      - in: query
        name: filename
        description: A file name including file extension.
        required: true
        schema:
          type: string
          example: document.xliff
      - in: query
        name: type
        description: The content-type or mime-type of the file to upload.
        required: true
        schema:
          type: string
          example: video/mp4
      - in: query
        name: metadata.size
        description: The size of the file to upload in bytes.
        required: false
        schema:
          type: integer
          minimum: 0
          example: 1024
      - in: query
        name: metadata.category
        description: File category metadata.
        required: false
        schema:
          type: string
          example: documents
      - in: query
        name: metadata.uuid
        description: File UUID metadata.
        required: false
        schema:
          type: string
          example: 123e4567-e89b-12d3-a456-426614174000
      - in: query
        name: metadata.labels
        description: Comma-separated list of label names to be added to the file after upload completes.
        required: false
        schema:
          type: string
          example: important,review-needed
      responses:
        '200':
          description: Upload initialization information.
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    description: Pre-signed URL for file upload
                    example: https://storage.googleapis.com/bucket/uploads/user123/file456.json?...
                  key:
                    type: string
                    description: Upload key identifier
                    example: uploads/user123/file456.json
                  method:
                    type: string
                    description: HTTP method to use for upload
                    example: PUT
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      summary: Initiate File Upload to Cloud Storage
      description: "Initiate the upload of a file to cloud storage. This endpoint provides the necessary information\nto complete the file upload process.\n\nSupports both single file and bulk upload requests. For bulk uploads, pass an array of upload\nobjects (maximum 100 items). The response format matches the request format - a single object\nfor single file requests, or an array for bulk requests.\n\nExample CURL command (single file):\n```\n  curl -X POST https://lilt.com/v2/upload/s3/params?key=API_KEY \\\n  --header \"Content-Type: application/json\" \\\n  --data-raw '{\n    \"filename\": \"example.json\",\n    \"type\": \"application/json\",\n    \"metadata\": {\n      \"size\": 1024,\n      \"labels\": [\"important\", \"review-needed\"]\n    }\n  }'\n```\n\nExample CURL command (bulk upload):\n```\n  curl -X POST https://lilt.com/v2/upload/s3/params?key=API_KEY \\\n  --header \"Content-Type: application/json\" \\\n  --data-raw '[\n    {\n      \"filename\": \"file1.json\",\n      \"type\": \"application/json\",\n      \"metadata\": { \"size\": 1024 }\n    },\n    {\n      \"filename\": \"file2.txt\",\n      \"type\": \"text/plain\",\n      \"metadata\": { \"size\": 2048 }\n    }\n  ]'\n```\n"
      operationId: initiateS3Upload
      tags:
      - Uploads
      requestBody:
        description: 'Information about the file(s) to be uploaded. Can be a single object or an array of objects (max 100).


          Single file request: `{ "filename": "...", "type": "...", "metadata": {...} }`

          Bulk request: `[{ "filename": "...", "type": "...", "metadata": {...} }, ...]`

          '
        required: true
        content:
          application/json:
            schema:
              title: InitiateUploadBody
              description: A single upload request object, or an array of upload request objects (max 100).
              type: object
              properties:
                filename:
                  description: A file name including file extension.
                  type: string
                  example: document.xliff
                type:
                  description: The content-type or mime-type of the file to upload.
                  type: string
                  example: video/mp4
                metadata:
                  description: Optional file metadata.
                  type: object
                  properties:
                    size:
                      description: The size of the file to upload in bytes.
                      type: integer
                      minimum: 0
                      example: 1024
                    category:
                      description: File category.
                      type: string
                      example: documents
                    uuid:
                      description: File UUID.
                      type: string
                      example: 123e4567-e89b-12d3-a456-426614174000
                    labels:
                      description: Array of label names to be added to the file after upload completes.
                      type: array
                      items:
                        type: string
                      example:
                      - important
                      - review-needed
              required:
              - filename
              - type
      responses:
        '200':
          description: 'Upload initialization information. Returns a single object for single file requests,

            or an array of objects for bulk requests.

            '
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    description: Pre-signed URL for file upload
                    example: https://storage.googleapis.com/bucket/uploads/user123/file456.json?...
                  key:
                    type: string
                    description: Upload key identifier
                    example: uploads/user123/file456.json
                  method:
                    type: string
                    description: HTTP method to use for upload
                    example: PUT
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v2/upload/s3/multipart:
    post:
      summary: Initiate Multipart Upload
      description: "Initiate a multipart upload for large files. This endpoint provides the necessary information\nto start a multipart upload process.\n\nSupports both single file and bulk upload requests. For bulk uploads, pass an array of upload\nobjects (maximum 100 items). The response format matches the request format - a single object\nfor single file requests, or an array for bulk requests.\n\nExample CURL command (single file):\n```\n  curl -X POST https://lilt.com/v2/upload/s3/multipart?key=API_KEY \\\n  --header \"Content-Type: application/json\" \\\n  --data-raw '{\n    \"filename\": \"large-file.zip\",\n    \"type\": \"application/zip\",\n    \"metadata\": {\n      \"size\": 104857600\n    }\n  }'\n```\n\nExample CURL command (bulk upload):\n```\n  curl -X POST https://lilt.com/v2/upload/s3/multipart?key=API_KEY \\\n  --header \"Content-Type: application/json\" \\\n  --data-raw '[\n    {\n      \"filename\": \"large-file1.zip\",\n      \"type\": \"application/zip\",\n      \"metadata\": { \"size\": 104857600 }\n    },\n    {\n      \"filename\": \"large-file2.zip\",\n      \"type\": \"application/zip\",\n      \"metadata\": { \"size\": 209715200 }\n    }\n  ]'\n```\n"
      operationId: initiateMultipartUpload
      tags:
      - Uploads
      requestBody:
        description: 'Information about the file(s) to be uploaded. Can be a single object or an array of objects (max 100).


          Single file request: `{ "filename": "...", "type": "...", "metadata": {...} }`

          Bulk request: `[{ "filename": "...", "type": "...", "metadata": {...} }, ...]`

          '
        required: true
        content:
          application/json:
            schema:
              title: InitiateMultipartUploadBody
              description: A single upload request object, or an array of upload request objects (max 100).
              type: object
              properties:
                filename:
                  description: A file name including file extension.
                  type: string
                  example: large-file.zip
                type:
                  description: The content-type or mime-type of the file to upload.
                  type: string
                  example: application/zip
                metadata:
                  description: Optional file metadata.
                  type: object
                  properties:
                    size:
                      description: The size of the file to upload in bytes.
                      type: integer
                      minimum: 0
                      example: 104857600
                    category:
                      description: File category.
                      type: string
                      example: documents
                    uuid:
                      description: File UUID.
                      type: string
                      example: 123e4567-e89b-12d3-a456-426614174000
                    labels:
                      description: Array of label names to be added to the file after upload completes.
                      type: array
                      items:
                        type: string
                      example:
                      - important
                      - review-needed
              required:
              - filename
              - type
      responses:
        '200':
          description: 'Multipart upload initialization information. Returns a single object for single file requests,

            or an array of objects for bulk requests.

            '
          content:
            application/json:
              schema:
                type: object
                properties:
                  uploadId:
                    type: string
                    description: Multipart upload ID for subsequent part uploads
                    example: abc123def456
                  key:
                    type: string
                    description: Upload key identifier
                    example: uploads/user123/large-file.zip
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v2/upload/s3/multipart/{uploadId}/complete:
    post:
      summary: Complete Multipart Upload
      description: "Complete a multipart upload by providing all uploaded parts information.\n\nExample CURL command:\n```\n  curl -X POST \"https://lilt.com/v2/upload/s3/multipart/abc123def456/complete?key=API_KEY&key=uploads/user123/file456.zip\" \\\n  --header \"Content-Type: application/json\" \\\n  --data-raw '{\n    \"parts\": [\n      {\"ETag\": \"etag1\", \"PartNumber\": 1},\n      {\"ETag\": \"etag2\", \"PartNumber\": 2}\n    ]\n  }'\n```\n"
      operationId: completeMultipartUpload
      tags:
      - Uploads
      parameters:
      - in: path
        name: uploadId
        description: Multipart upload ID from initiate response
        required: true
        schema:
          type: string
      - in: query
        name: s3Key
        description: Upload key from initiate response
        required: true
        schema:
          type: string
      requestBody:
        description: Information about uploaded parts.
        required: true
        content:
          application/json:
            schema:
              title: CompleteMultipartUploadBody
              type: object
              properties:
                parts:
                  description: Array of completed upload parts.
                  type: array
                  items:
                    type: object
                    properties:
                      ETag:
                        description: ETag of the uploaded part
                        type: string
                        example: abc123def456
                      PartNumber:
                        description: Part number (1-based)
                        type: integer
                        minimum: 1
                        example: 1
                    required:
                    - ETag
                    - PartNumber
              required:
              - parts
      responses:
        '200':
          description: Upload completion confirmation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    description: Upload completion status
                    type: boolean
                    example: true
                  location:
                    description: Final file location
                    type: string
                    example: https://storage.googleapis.com/bucket/uploads/user123/file456.zip
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v2/upload/s3/multipart/{uploadId}/{partNumber}:
    get:
      summary: Sign Upload Part
      description: "Get a signed URL for uploading a specific part of a multipart upload.\n\nMake sure to set the part size to 8MB (8388608 bytes).\n\nExample CURL command:\n```\n  curl -X GET \"https://lilt.com/v2/upload/s3/multipart/abc123def456/1?key=API_KEY&key=uploads/user123/file456.zip&size=5242880\"\n```\n"
      operationId: signUploadPart
      tags:
      - Uploads
      parameters:
      - in: path
        name: uploadId
        description: Multipart upload ID from initiate response
        required: true
        schema:
          type: string
      - in: path
        name: partNumber
        description: Part number (1-based)
        required: true
        schema:
          type: integer
          minimum: 1
      - in: query
        name: s3Key
        description: Upload key from initiate response
        required: true
        schema:
          type: string
      - in: query
        name: size
        description: Size of this part in bytes
        required: true
        schema:
          type: integer
          minimum: 0
      responses:
        '200':
          description: Signed URL for part upload.
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    description: Pre-signed URL for this part upload
                    type: string
                    example: https://storage.googleapis.com/bucket/uploads/user123/file456.zip?partNumber=1&...
                  method:
                    description: HTTP method to use for upload
                    type: string
                    example: PUT
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v2/upload/s3/multipart/{uploadId}:
    delete:
      summary: Cancel Multipart Upload
      description: "Cancel/abort a multipart upload and clean up any uploaded parts.\n\nExample CURL command:\n```\n  curl -X DELETE \"https://lilt.com/v2/upload/s3/multipart/abc123def456?key=API_KEY&key=uploads/user123/file456.zip\"\n```\n"
      operationId: cancelMultipartUpload
      tags:
      - Uploads
      parameters:
      - in: path
        name: uploadId
        description: Multipart upload ID to cancel
        required: true
        schema:
          type: string
      - in: query
        name: s3Key
        description: Upload key from initiate response
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Upload cancellation confirmation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    description: Cancellation status
                    type: boolean
                    example: true
                  message:
                    description: Cancellation message
                    type: string
                    example: Multipart upload cancelled successfully
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        message:
          type: string
          description: A human-readable message describing the error.
      description: 'Response in the event of an unexpected error.

        '
      example:
        message: Internal server error.
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    ApiKeyAuth:
      type: apiKey
      name: key
      in: query