> ## Documentation Index
> Fetch the complete documentation index at: https://support.lilt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Initiate File Upload to Cloud Storage

> Initiate the upload of a file to cloud storage. This endpoint provides the necessary information
to complete the file upload process.

Supports both single file and bulk upload requests. For bulk uploads, pass an array of upload
objects (maximum 100 items). The response format matches the request format - a single object
for single file requests, or an array for bulk requests.

Example CURL command (single file):
```
  curl -X POST https://lilt.com/v2/upload/s3/params?key=API_KEY \
  --header "Content-Type: application/json" \
  --data-raw '{
    "filename": "example.json",
    "type": "application/json",
    "metadata": {
      "size": 1024,
      "labels": ["important", "review-needed"]
    }
  }'
```

Example CURL command (bulk upload):
```
  curl -X POST https://lilt.com/v2/upload/s3/params?key=API_KEY \
  --header "Content-Type: application/json" \
  --data-raw '[
    {
      "filename": "file1.json",
      "type": "application/json",
      "metadata": { "size": 1024 }
    },
    {
      "filename": "file2.txt",
      "type": "text/plain",
      "metadata": { "size": 2048 }
    }
  ]'
```




## OpenAPI

````yaml /api-reference/openapi-bundled.yaml post /v2/upload/s3/params
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/upload/s3/params:
    post:
      tags:
        - Uploads
      summary: Initiate File Upload to Cloud Storage
      description: >
        Initiate the upload of a file to cloud storage. This endpoint provides
        the necessary information

        to complete the file upload process.


        Supports both single file and bulk upload requests. For bulk uploads,
        pass an array of upload

        objects (maximum 100 items). The response format matches the request
        format - a single object

        for single file requests, or an array for bulk requests.


        Example CURL command (single file):

        ```
          curl -X POST https://lilt.com/v2/upload/s3/params?key=API_KEY \
          --header "Content-Type: application/json" \
          --data-raw '{
            "filename": "example.json",
            "type": "application/json",
            "metadata": {
              "size": 1024,
              "labels": ["important", "review-needed"]
            }
          }'
        ```


        Example CURL command (bulk upload):

        ```
          curl -X POST https://lilt.com/v2/upload/s3/params?key=API_KEY \
          --header "Content-Type: application/json" \
          --data-raw '[
            {
              "filename": "file1.json",
              "type": "application/json",
              "metadata": { "size": 1024 }
            },
            {
              "filename": "file2.txt",
              "type": "text/plain",
              "metadata": { "size": 2048 }
            }
          ]'
        ```
      operationId: initiateS3Upload
      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'
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

````