> ## 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.

# 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:
```bash
curl -X POST 'https://api.lilt.com/v2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true'
```





## OpenAPI

````yaml /api-reference/openapi-bundled.yaml post /v2/translate/file
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/translate/file:
    post:
      tags:
        - Translate
      summary: Translate a File
      description: >+
        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:

        ```bash

        curl -X POST
        'https://api.lilt.com/v2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true'

        ```

      operationId: batchTranslateFile
      parameters:
        - name: fileId
          in: query
          description: List of File ids to be translated, comma separated.
          required: true
          schema:
            type: integer
        - name: memoryId
          in: query
          description: Id of Memory to use in translation.
          required: true
          schema:
            type: integer
        - name: configId
          in: query
          description: >-
            An optional pararameter to specify an import configuration to be
            applied when extracting translatable content from this file.
          schema:
            type: integer
        - name: withTM
          in: query
          description: >-
            An optional boolean parameter to toggle the use of Translation
            Memory in the translation of the file.
          schema:
            type: boolean
        - name: externalModelId
          in: query
          description: >-
            An optional parameter to specify a third-party model to use for
            translation. This allows you to use external MT providers instead of
            Lilt's built-in MT system.
          schema:
            type: integer
      responses:
        '200':
          description: Translation Info
          content:
            application/json:
              schema:
                title: batchTranslateFileResponse
                type: array
                description: List of TranslationInfo objects
                items:
                  $ref: '#/components/schemas/TranslationInfo'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    TranslationInfo:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for this translation.
        fileId:
          type: integer
          description: id of the File that is being translated.
        status:
          type: string
          description: >-
            Status of the translation - `InProgress`, `ReadyForDownload`,
            `Completed`, `Failed`.
        createdAt:
          type: integer
          description: >-
            Time when this translation was started, in seconds since the Unix
            epoch.
        errorMsg:
          type: string
          description: Error message, present when status is `Failed`.
      description: |
        Information describing a batch translation process.
      example:
        id: 1
        fileId: 2,
        status: InProgress
        createdAt: 1609357135
    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.
  responses:
    UnauthorizedError:
      description: Unauthorized
      content:
        application/octet-stream:
          schema:
            type: string
        text/plain:
          schema:
            type: string
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    ApiKeyAuth:
      type: apiKey
      name: key
      in: query

````