Documents API PDF Translation API
Send a PDF and get a translated PDF with the original layout, tables and images in place, or a bilingual version with both languages.
POSThttps://api.pathclue.com/v1/documents/pdf-translateBetaCall it from your code
Set your key in the TAPCUB_API_KEY environment variable. Base URL: https://api.pathclue.com/v1.
curl -X POST "https://api.pathclue.com/v1/documents/pdf-translate?target=zh&source=en" \
-H "Authorization: Bearer $TAPCUB_API_KEY" \
-H "Content-Type: application/octet-stream" \
--data-binary @input.pdfimport { readFile } from 'node:fs/promises';
const res = await fetch('https://api.pathclue.com/v1/documents/pdf-translate?target=zh&source=en', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TAPCUB_API_KEY}`,
'Content-Type': 'application/octet-stream',
},
body: await readFile('input.pdf'),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());import os
import requests
res = requests.post(
"https://api.pathclue.com/v1/documents/pdf-translate",
headers={"Authorization": f"Bearer {os.environ['TAPCUB_API_KEY']}", "Content-Type": "application/octet-stream"},
params={
"target": "zh",
"source": "en",
},
data=open("input.pdf", "rb"),
timeout=120,
)
res.raise_for_status()
print(res.json())<?php
$ch = curl_init('https://api.pathclue.com/v1/documents/pdf-translate?target=zh&source=en');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('TAPCUB_API_KEY'),
'Content-Type: application/octet-stream',
],
CURLOPT_POSTFIELDS => file_get_contents('input.pdf'),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($status >= 300) {
throw new RuntimeException("HTTP $status: $body");
}
print_r(json_decode($body, true));package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
body, err := os.ReadFile("input.pdf")
if err != nil {
panic(err)
}
req, err := http.NewRequest("POST", "https://api.pathclue.com/v1/documents/pdf-translate?target=zh&source=en", bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("TAPCUB_API_KEY"))
req.Header.Set("Content-Type", "application/octet-stream")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
if res.StatusCode >= 300 {
panic(fmt.Sprintf("HTTP %d: %s", res.StatusCode, out))
}
fmt.Println(string(out))
}Send the file itself as the request body and put the options in the query string.
This endpoint is asynchronous: it returns 202 with a job ID. Poll GET https://api.pathclue.com/v1/jobs/{id} for the status and a download link that stays valid for one hour.
Request parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
target | enumone of: en | zh | zh-TW | ja | ko | es | fr | de | pt | it | ru | id | vi | tr | nl | pl | uk | ms | sv | el | cs | ro | hu | da | fi | no | fil | Yes | — | Language to translate into. |
source | enumone of: en | zh | zh-TW | ja | ko | es | fr | de | pt | it | ru | id | vi | tr | nl | pl | uk | ms | sv | el | cs | ro | hu | da | fi | no | fil | No | "en" | Language of the PDF. |
Example response
Successful responses carry the X-Credits-Charged and X-Credits-Balance headers. Errors return {"error":{"code","message"}} and are never charged.
{
"jobId": "api_20261202_Q2xk3f9sLmP0aZxw8tYr",
"status": "queued",
"op": "documents/pdf-translate",
"pages": 6,
"target": "zh",
"source": "en",
"statusUrl": "https://api.pathclue.com/v1/jobs/api_20261202_Q2xk3f9sLmP0aZxw8tYr",
"createdAt": "2026-12-02T08:00:00.000Z"
}What it costs
| Price | 20 credits per page |
|---|---|
| In US dollars | about $0.02 · $20 / 1,000 |
| Credits | Paid credits only |
| Rate limit | Free 10 / min · Plus 60 / min · Pro 300 / min |
| Charged | Only on success — errors and timeouts are free |
What people build with it
Manuals
Ship product manuals in more languages without re-typesetting.
Research papers
Read papers in your language with figures and formulas intact.
Contract review
Compare source and translation side by side.
Frequently asked questions
Still have a question?
Chat with the team behind TapCub — we usually reply within a few hours on business days.
Why is it asynchronous?
A document takes from tens of seconds to a few minutes. The call returns 202 with a job ID; poll the job until it is done, then download the file within one hour.
Which engine does it use?
The open-source BabelDOC engine, run as a separate service on our servers.
How much does the PDF Translation API cost?
Each successful call costs 20 credits per page (about $0.02). 1 credit is about $0.001. Failed calls — invalid input, unreachable sites, timeouts or errors on our side — are not charged.
Can I use free credits?
No. Document and image endpoints only use paid credits from a Tools plan or a credit pack. To check the result before you pay, use the matching free tool on tapcub.com.
What are the rate limits?
Free accounts can make 10 calls a minute and 1,000 a day per key; Plus allows 60 a minute and Pro 300. Over the limit you get HTTP 429 with a Retry-After header, and nothing is charged.
How do I get an API key?
Sign in to the TapCub console, verify your email and create a key on the Tools → API page. Keys start with tck_ and are shown once; send them in the Authorization: Bearer header.
Get your API key
Create a key in the console and make your first call in a minute. Light endpoints run on free daily credits.