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

# Verified Translation

Verified Translation has a human in the loop to ensure the highest translation quality. That means immediate turn around times will not be possible unlike with [Instant Translate](/developers/guides/translate-content/instant-translate).

In this section we will discuss:

* [Uploading Files](#uploading-files)
* [Creating a Job](#creating-a-job)
* [Monitoring Job Status](#monitoring-the-job-status)
* [Downloading Translated Jobs](#downloading-translated-jobs)
* [Archiving Downloaded Jobs](#archiving-downloaded-jobs)

Things you will need:

* API Key - All requests through the LILT API use the API Key to authenticate.
* File to Translate - We recommend a simple text file (txt) for a first attempt.
* Memory ID - A LILT Data Source's `memoryId` to use with the translation - [Create one here!](/developers/guides/manage-content/create-a-datasource)

## Submitting a New LILT Job

A LILT Job encapsulates the various files that you want to translate. A Job is usually made up of multiple Projects. A Project is a grouping of Documents to be translated for an individual language pair (en->de - English to German). The LILT app has a useful wizard for creating Jobs that breaks all of these concepts down into a single package.

In the next section you will learn how to create your first LILT Job. If you are curious about how these objects fit together, feel free to check out the API Reference:

* [Jobs](/api-reference/jobs)
* [Projects](/api-reference/projects)
* [Documents](/api-reference/documents)
* [Files](/api-reference/files)
* [Languages](/api-reference/languages)

## Uploading Files

The first step is to upload some files. For this example, a text (txt) file will be used as it is one of the simplest file types supported for verified translation. [See the API docs for more file upload options](/api-reference/files/upload-a-file).

```java theme={null}
curl -X POST https://api.lilt.com/v2/files?key=API_KEY&name=testfile.txt \
  --header "Content-Type: application/octet-stream" \
  --data-binary @testfile.txt
```

The response will have an ID that relates to the File:

```javascript theme={null}
{
  "id": {Your File Id here},
  "name": "testfile.txt",
  "file_hash": "3858f62230ac3c915f300c664312c63f",
  "detected_lang": "en",
  "detected_lang_confidence": 0.7,
  "category": "API",
  "labels": [],
  "created_at": "2024-02-16T22:12:34.000Z",
  "updated_at": "2024-02-16T22:12:34.000Z"
}
```

Hold onto the file IDs as you will need them in Step 2. If you lose them, you can always query the [Files API](/api#tag/Files/operation/getFiles) to see a list of your files.

<Tip>
  **Tip**

  Upload all of the files first before creating a Job with them.
</Tip>

## Creating a Job

To create a Job you need at least one Data Source for the language you want to translate into. We will use the corresponding `memoryId` and the target language from that memory to specify a Language Pair, which can then be linked to the relevant Job.

### Basic Job Creation

For now, let's create a Job for a single File and a single Language Pair. The request to create a Job will look like this. [See the API docs for more info](/api-reference/jobs/retrieve-all-jobs).

```bash theme={null}
curl -X POST 'https://api.lilt.com/v2/jobs?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "test job",
  "fileIds": [1234],
  "due": "2024-02-05T10:56:44.985Z",
  "srcLang": "en",
  "srcLocale": "US",
  "languagePairs": [
      { "memoryId": 3121, "trgLang": "de" }
    ]
}'
```

### Advanced Job Creation with Unified Fields

You can also include additional fields to provide more context and metadata:

```swift theme={null}
curl -X POST 'https://api.lilt.com/v2/jobs?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "Marketing Campaign Q1",
  "fileIds": [1234, 1235],
  "due": "2024-02-05T10:56:44.985Z",
  "srcLang": "en",
  "srcLocale": "US",
  "jobInstructions": "This is a marketing campaign for Q1. Please maintain brand voice and use approved terminology from the style guide.",
  "customProperties": {
    "purchaseOrder": "PO-2024-Q1-001",
    "department": "Marketing",
    "campaign": "Q1-Launch",
    "priority": "high"
  },
  "enablePostProcessing": true,
  "languagePairs": [
      {
        "memoryId": 3121,
        "trgLang": "de",
        "instructions": "Use formal German (Sie form) for B2B audience"
      },
      {
        "memoryId": 3122,
        "trgLang": "fr",
        "instructions": "Use informal French (tu form) for consumer audience"
      }
    ]
}'
```

**Field Descriptions:**

* **`jobInstructions`** (optional): General instructions that apply to all projects in the job. Visible to all translators and reviewers. Max 5000 characters.
* **`customProperties`** (optional): Key-value pairs for custom metadata. Useful for tracking purchase orders, departments, or other organizational data.
* **`enablePostProcessing`** (optional): Boolean flag to enable additional post-processing steps after translation.
* **`languagePairs[].instructions`** (optional): Language-specific instructions for each target language. Max 200 characters per language pair.

That is all it takes to create a Verified Translation Job in LILT with full context and metadata.

The Job has now been created and the LILT team will handle processing the verified translations. The Job will be marked as Delivered in LILT to indicate that the translations are ready for download.

## Monitoring the Job Status

To determine which translations are ready for download query for jobs where `isDelivered=true` and `isArchived=false`.

```bash theme={null}
curl -X GET https://api.lilt.com/v2/jobs?key=API_KEY&isDelivered=true&isArchived=false
```

[See the API Docs for more info](/api-reference/jobs/retrieve-all-jobs).

## Downloading Translated Jobs

To download the completed translations, first initiate an export of the Job using the [export endpoint](/api-reference/jobs/export-a-job). This will set the `isProcessing` value to `1`.

```powershell theme={null}
curl -X GET 'https://api.lilt.com/v2/jobs/{id}/export?key=API_KEY&type=files'
```

Check the status of the export by calling the [get job by ID endpoint](/api-reference/jobs/retrieve-a-job). When the export is complete, the `isProcessing` value will be set to `0` (or `-2` in the case of an export error).

```powershell theme={null}
curl -X GET 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY'
```

Once the export is complete the translations can be downloaded. The [download endpoint](/api-reference/jobs/download-a-job) will return a zip file containing all of the translations.

```powershell theme={null}
curl -X GET 'https://api.lilt.com/v2/jobs/{id}/download?key=API_KEY'
```

## Archiving Downloaded Jobs

Call the [archive endpoint](/api-reference/jobs/archive-a-job) after successful download of the translations to indicate that the translations have been received.

```powershell theme={null}
curl -X POST 'https://api.lilt.com/v2/jobs/{id}/archive?key=API_KEY'
```

That concludes this end-to-end guide for completing Verified Translation Jobs using the LILT API.
