PageTranslate.ai API
Programmatic access to our AI-powered translation service. Integrate book translation into your workflows, apps, and services.
Secure API Keys
SHA-256 hashed keys with instant revocation. Maximum 10 active keys per account.
RESTful API
Simple REST endpoints with JSON responses. Standard HTTP status codes.
Rate Limiting
Configurable rate limits with clear headers. 5 uploads/hour by default.
Quick Start
1. Create an API Key
- Log in to your PageTranslate.ai account and verify your email
- Navigate to Dashboard → API Keys
- Click "Create API Key" and give it a name
- Copy and securely store your key (shown only once!)
2. Make Your First Request
curl -X POST "https://api.pagetranslate.ai/api/v1/upload/" \
-H "Authorization: Bearer pt_live_YOUR_API_KEY" \
-F "[email protected]" \
-F "requested_language=es" \
-F "layout_mode=layout_preserving"MCP Server and Agent Skills
Connect from ChatGPT, Claude or Grok
Add PageTranslate as a custom connector in any assistant that takes a remote MCP server. Paste the address below, sign in to PageTranslate and allow access. There is no API key to copy. Give the assistant a link to your PDF, DOCX or EPUB: it uploads the file, tells you the exact price, and hands you a download link when the translation is ready.
https://pagetranslate.ai/mcpMCP server on your computer
Let Claude, Cursor, Codex, Gemini CLI or any MCP client translate a file on your computer. The agent uploads it, shows you the exact price, and saves the translated file next to the original. It cannot spend money: you pay in your browser.
{
"mcpServers": {
"pagetranslate": {
"command": "npx",
"args": ["-y", "pagetranslate-mcp"],
"env": { "PAGETRANSLATE_API_KEY": "pt_live_YOUR_KEY" }
}
}
}PageTranslate MCP server on GitHub · pagetranslate-mcp on npm
Agent skills
Four skills teach an agent the whole flow for PDFs, scanned PDFs, books and Word documents. They work in Claude Code, Cursor, Codex, Pi, Hermes and OpenClaw, with or without the MCP server.
# Claude Code, Cursor, Codex and other skills.sh agents
npx skills add Caravaca-Labs/pagetranslate-mcp --skill '*' --yes
# Pi
pi install npm:pagetranslate-mcp
# OpenClaw
clawhub install pagetranslate-pdf-translatorn8n workflows
The verified PageTranslate node uploads a file from any workflow, returns its word count and price, starts the translation from your account's words and hands back a download link. On n8n Cloud, search for PageTranslate in the editor. Self-hosted n8n needs verified community nodes turned on in the admin panel. Add a PageTranslate API key as the node's credential.
Bubble and RapidAPI
The Bubble plugin adds upload, status, start and download actions to your app, using your own PageTranslate API key. The same document operations are also listed on RapidAPI. Both start a translation only from your account's words, never a card.
Code Examples
Python
import requests
API_KEY = "pt_live_YOUR_KEY"
BASE_URL = "https://api.pagetranslate.ai/api/v1"
# Upload document
with open("book.docx", "rb") as f:
response = requests.post(
f"{BASE_URL}/upload/",
headers={"Authorization": f"Bearer {API_KEY}"},
files={"file": f},
data={
"requested_language": "es",
"layout_mode": "layout_preserving"
}
)
job_id = response.json()["job_id"]
# Start translation
requests.post(
f"{BASE_URL}/jobs/{job_id}/translate",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"target_lang": "es"}
)JavaScript
const axios = require("axios");
const FormData = require("form-data");
const fs = require("fs");
const API_KEY = "pt_live_YOUR_KEY";
const BASE_URL = "https://api.pagetranslate.ai/api/v1";
// Upload document
const formData = new FormData();
formData.append("file", fs.createReadStream("book.docx"));
formData.append("requested_language", "es");
formData.append("layout_mode", "layout_preserving");
const upload = await axios.post(
`${BASE_URL}/upload/`,
formData,
{
headers: {
"Authorization": `Bearer ${API_KEY}`,
...formData.getHeaders()
}
}
);
const jobId = upload.data.job_id;Key Endpoints
/api/v1/api-keysCreate a new API key. The full key is shown only once during creation.
/api/v1/api-keysList all API keys (masked). Full keys are never returned in list responses.
/api/v1/api-keys/{key_id}Revoke an API key immediately. Returns 204 No Content on success.
/api/v1/uploadUpload a document (DOCX, PDF, EPUB) for translation. Returns a job ID.
Optional: layout_mode (default: layout_preserving)
/api/v1/jobs/{job_id}/translateStart translation for an uploaded job. Specify target language and model.
/api/v1/jobs/{job_id}Check translation status. Returns progress, status, and download URL when ready.
/api/v1/jobs/{job_id}/downloadDownload the translated document once translation is complete.
/api/v1/pricing/catalogGet pricing information including plan limits and per-word rates.
Base URLs
https://api.pagetranslate.ai/api/v1Authentication
Include your API key in the Authorization header:
Authorization: Bearer pt_live_...Supported Formats
DOCX
Microsoft Word documents with full formatting preservation
PDF documents with text extraction and layout preservation
EPUB
eBook format with structure and metadata preservation
Rate Limits & Best Practices
Rate Limits
- •Upload: 5 requests/hour per user/IP
- •Login: 10 requests/minute per IP
- •Rate limit headers included in responses
- •429 status code when limit exceeded
Best Practices
- •Store API keys in environment variables
- •Implement exponential backoff for retries
- •Poll status every 10-30 seconds
- •Handle errors gracefully with try/catch