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

# Document Translation

> On this page, we'll dive into the document translation endpoints for creating translation jobs directly from office documents.

Document translation jobs allow you to translate office documents — Word, Excel, and PowerPoint files — directly, using natural language instructions to control what gets translated. Upload your document via the [files](/files) endpoints first, then create a job with the file's S3 key. Each endpoint responds with a job object; use the [translation jobs](/translation) endpoints to track job status and retrieve results.

## Create a Word document translation job

**`POST /v1/jobs/translate/docx`**

This endpoint allows you to create a new Word document translation job with content-level filtering. DOCX files are translated using memoQ/AIMT, with optional content exclusions via natural language instructions (e.g. "do not translate the highlighted text"). Upload the .docx file via [files](/files) first.

### Required attributes

<ParamField body="source_file" type="string" required>
  S3 key of the .docx file (uploaded via /files).
</ParamField>

<ParamField body="instruction" type="string" required>
  Natural language instruction for content filtering, e.g. "do not translate the highlighted text".
</ParamField>

<ParamField body="source_language" type="string" required>
  Source language code (e.g., "en").
</ParamField>

<ParamField body="target_languages" type="array" required>
  Target language codes (e.g., \["de", "fr"]).
</ParamField>

### Optional attributes

<ParamField body="domain" type="string">
  Content domain for the translation (e.g., "technical", "legal", "marketing").
</ParamField>

<ParamField body="glossaries" type="array">
  List of glossary IDs to use for terminology consistency.
</ParamField>

<ParamField body="context_stores" type="array">
  List of context store IDs to provide reference materials (styleguide content).
</ParamField>

<ParamField body="instructions" type="string">
  Additional translation instructions or styleguide content.
</ParamField>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.elanlanguages.ai/v1/jobs/translate/docx \
    -H "Authorization: Bearer {token}" \
    -H "X-Org-Id: {orgId}" \
    -H "Content-Type: application/json" \
    -d '{
      "source_file": "uploads/employee-handbook.docx",
      "instruction": "do not translate the highlighted text",
      "source_language": "en",
      "target_languages": ["de", "fr"],
      "domain": "legal",
      "glossaries": [1, 2]
    }'
  ```
</CodeGroup>

```json Response theme={null}
{
  "job_id": "job_docx_abc123def456",
  "status": "queued",
  "message": "Word document translation job created successfully",
  "created_at": "2025-12-21T10:34:41.135Z"
}
```

***

## Create an Excel translation job

**`POST /v1/jobs/translate/excel`**

This endpoint allows you to create a new Excel translation job driven by natural language instructions. Excel files are translated directly using AI, without TMS/XLIFF intermediaries. Upload the .xlsx file via [files](/files) first, then provide instructions like "translate column A, put Spanish in B, Italian in C".

### Required attributes

<ParamField body="source_file" type="string" required>
  S3 key of the .xlsx file (uploaded via /files).
</ParamField>

<ParamField body="instruction" type="string" required>
  Natural language instruction, e.g. "translate column A, put results in B and C".
</ParamField>

<ParamField body="source_language" type="string" required>
  Source language code (e.g., "en").
</ParamField>

<ParamField body="target_languages" type="array" required>
  Target language codes (e.g., \["es", "it"]).
</ParamField>

### Optional attributes

<ParamField body="domain" type="string">
  Content domain for the translation (e.g., "marketing", "legal").
</ParamField>

<ParamField body="provider" type="string">
  Translation provider (default: "openai").
</ParamField>

<ParamField body="glossaries" type="array">
  List of glossary IDs to use for terminology consistency.
</ParamField>

<ParamField body="context_stores" type="array">
  List of context store IDs to provide reference materials (styleguide content).
</ParamField>

<ParamField body="instructions" type="string">
  Additional translation instructions or styleguide content.
</ParamField>

<ParamField body="sheet_name" type="string">
  Name of the sheet to process (default: active sheet).
</ParamField>

<ParamField body="header_row" type="integer">
  1-based header row override.
</ParamField>

<ParamField body="start_row" type="integer">
  1-based data start row override.
</ParamField>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.elanlanguages.ai/v1/jobs/translate/excel \
    -H "Authorization: Bearer {token}" \
    -H "X-Org-Id: {orgId}" \
    -H "Content-Type: application/json" \
    -d '{
      "source_file": "uploads/product-catalog.xlsx",
      "instruction": "translate column A, put Spanish in B and Italian in C",
      "source_language": "en",
      "target_languages": ["es", "it"],
      "sheet_name": "Products"
    }'
  ```
</CodeGroup>

```json Response theme={null}
{
  "job_id": "job_xlsx_abc123def456",
  "status": "queued",
  "message": "Excel translation job created successfully",
  "created_at": "2025-12-21T10:34:41.135Z"
}
```

***

## Create a PowerPoint translation job

**`POST /v1/jobs/translate/ppt`**

This endpoint allows you to create a new PowerPoint translation job with slide-level filtering. PPTX files are translated using memoQ/AIMT, with optional slide selection via natural language instructions (e.g. "translate only slides 1-3 and 6-7"). Upload the .pptx file via [files](/files) first.

### Required attributes

<ParamField body="source_file" type="string" required>
  S3 key of the .pptx file (uploaded via /files).
</ParamField>

<ParamField body="instruction" type="string" required>
  Natural language instruction for slide selection, e.g. "translate only slides 1-3 and 6-7".
</ParamField>

<ParamField body="source_language" type="string" required>
  Source language code (e.g., "en").
</ParamField>

<ParamField body="target_languages" type="array" required>
  Target language codes (e.g., \["de", "fr"]).
</ParamField>

### Optional attributes

<ParamField body="domain" type="string">
  Content domain for the translation (e.g., "technical", "legal", "marketing").
</ParamField>

<ParamField body="glossaries" type="array">
  List of glossary IDs to use for terminology consistency.
</ParamField>

<ParamField body="context_stores" type="array">
  List of context store IDs to provide reference materials (styleguide content).
</ParamField>

<ParamField body="instructions" type="string">
  Additional translation instructions or styleguide content.
</ParamField>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.elanlanguages.ai/v1/jobs/translate/ppt \
    -H "Authorization: Bearer {token}" \
    -H "X-Org-Id: {orgId}" \
    -H "Content-Type: application/json" \
    -d '{
      "source_file": "uploads/quarterly-review.pptx",
      "instruction": "translate only slides 1-3 and 6-7",
      "source_language": "en",
      "target_languages": ["de", "fr"]
    }'
  ```
</CodeGroup>

```json Response theme={null}
{
  "job_id": "job_ppt_abc123def456",
  "status": "queued",
  "message": "PowerPoint translation job created successfully",
  "created_at": "2025-12-21T10:34:41.135Z"
}
```
