---
title: Translate Documents API
slug: translate-document-text
url: https://apyverse.com/apyhub/service/translate-document-text
provider: ApyHub
categories: [File Conversion, Smart Generation]
auth: api_key
---

# Translate Documents API

Translate uploaded documents or documents from a URL into a target language. Returns translated text, detected language, and transliterated output when supported.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `translate/file` | What it does Translates an uploaded document from the file you send in the request body and returns… | 150 |
| POST | `translate/url` | What it does Translates a document fetched from a URL into the requested language. It takes the sou… | 150 |

## About

## What it does
Document Translator translates uploaded documents or documents fetched from a URL into a target language you choose. Send a file and a `language` code, or provide a `url` and `language`, and get translated text back along with the target language that was used.

Use the `/file` endpoint when you already have the document in hand. It accepts a binary `file`, a target `language` code such as `fr` or `de`, and optional `file_type` and `transliteration` query values. Use `/url` when the document is already hosted elsewhere; it accepts a `url`, a target `language`, and optional `perform_transliteration`, `file_type`, and `transliteration` values.

The response includes `translation` and `translated_language` as required fields. When language detection is available, you also get `detected_language` with a `language` code and confidence `score`. If transliteration is requested and supported, the response may also include `transliteration`.

Document Translator fits workflows such as localizing uploaded PDFs, translating reference docs from a public URL, or routing translated content into review and publishing systems without adding manual copy-paste steps.

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyverse.com/apyhub/service/translate-document-text
