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

# Get Document Translation Result

> Fetch the translated document download URL for a completed document translation run.

Use this endpoint after a document translation task completes successfully. Pass the `run_id` returned by [Get Document Translation Status](https://docs.camb.ai/api-reference/endpoint/get-doc-translation-status.md), and the API returns a `download_url` for the translated document.

## Response

This endpoint delivers the final output of the document translation workflow: a downloadable translated document. Once your document translation task has completed successfully and you have a `run_id`, this endpoint returns the URL where the translated file can be downloaded.

The response contains a single field:

* `download_url`: a presigned URL for downloading the translated document.

The structure of the response follows this format:

```json theme={null}
{
  "download_url": "https://storage.example.com/path/to/translated-document.docx?..."
}
```

Download the file soon after receiving the URL, since generated file URLs may expire. Store the file in your own storage if you need long-term access.

## Working with the Result

The `download_url` points to the translated document file, not inline translated text. Your application can use it to:

1. Download the translated document for a user.
2. Store the translated document in your own storage.
3. Attach the document to an email, CMS entry, or downstream workflow.

## Example

```python [expandable] theme={null}
import requests

API_KEY = "your-api-key"
BASE_URL = "https://client.camb.ai/apis"
RUN_ID = 12345

headers = {"x-api-key": API_KEY}

response = requests.get(
    f"{BASE_URL}/translate-doc-result/{RUN_ID}",
    headers=headers,
)
response.raise_for_status()

result = response.json()
download_url = result["download_url"]
print(download_url)

translated_file = requests.get(download_url)
translated_file.raise_for_status()

with open("translated-document.docx", "wb") as output:
    output.write(translated_file.content)
```

## Complete Workflow

1. Create a document translation task with [Create Document Translation](https://docs.camb.ai/api-reference/endpoint/create-doc-translation.md).
2. Poll the task with [Get Document Translation Status](https://docs.camb.ai/api-reference/endpoint/get-doc-translation-status.md).
3. Use the successful `run_id` here to download the translated document.


## OpenAPI

````yaml get /translate-doc-result/{run_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://client.camb.ai/apis
security: []
paths:
  /translate-doc-result/{run_id}:
    get:
      tags:
        - Apis
        - Document Translation
      summary: Get Document Translation Result
      description: >-
        Get the translated document download URL by using the run_id returned
        when the document translation task completes.
      operationId: get_doc_translation_result_translate_doc_result__run_id__get
      parameters:
        - name: run_id
          in: path
          required: true
          description: >-
            The unique identifier for the document translation run, returned
            when the task completes.
          schema:
            $ref: '#/components/schemas/RunIDParam'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocTranslationResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    RunIDParam:
      type: integer
      title: Run ID
      description: >-
        The unique identifier for the run, which was generated during the
        creation process and returned upon task completion.
    DocTranslationResult:
      type: object
      properties:
        download_url:
          type: string
          title: Download URL
          description: A presigned URL for downloading the translated document.
      required:
        - download_url
      title: DocTranslationResult
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        The `x-api-key` is a custom header required for authenticating requests
        to our API. Include this header in your request with the appropriate API
        key value to securely access our endpoints. You can find your API key(s)
        in the 'API' section of our studio website.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.