---
title: Translate Documents API
slug: translate-documents
url: https://apyhub.com/apyhub/service/translate-documents
provider: ApyHub
categories: [File Conversion, Smart Generation]
tags: [document-translation, language-detection, transliteration, file-translation, url-translation]
auth: api_key
---

# Translate Documents API

Translate uploaded documents or document URLs into a target language. Returns translated text, translated language, and optional detected language.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/translate/file` | What it does Uploads a document file and translates its text into the requested target language. Yo… | 150 |
| POST | `/translate/url` | What it does Translates a document fetched from a URL into the target language you provide, and ret… | 150 |

## About

## What it does
Document Translation translates uploaded documents or documents fetched from a URL into a target language. Send a file or a document URL, choose an Azure language code, and get translated text back with the translated language in the response.

Use the `/file` endpoint when you already have the document bytes, or `/url` when the source document is hosted elsewhere. Both endpoints accept a `file_type` query parameter, and the file-based endpoint also accepts `transliteration` in the query string. The URL-based endpoint lets you request transliteration with `perform_transliteration` in the body.

The response includes `translation` and `translated_language`, which are required. When available, it can also return `detected_language` with a score and language code, plus `transliteration` when transliteration is requested and supported. That makes it useful for workflows where you need the translated document text for review, indexing, or downstream language-specific processing.

Use Document Translation when you need to localize uploaded PDFs and other document files, extract translated content from a hosted document, or route content based on detected language without building your own translation pipeline.

## Usage

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