PDF Language Translator
Developer Portal & API Docs
Integrate layout-aware AI document translation into your apps, command-line scripts, and autonomous LLM agents. Zero server storage, 120+ languages, and native script fidelity.
REST Endpoint
High-speed POST endpoint accepting JSON body with text, target language, and tone configuration.
Zero Retention
Memory-only translation. No document files or translated payloads are stored on server disk.
120+ Languages
Native script rendering for Indic, European, East Asian, and Middle Eastern languages.
Translate text or document extracts into any supported language.
Request Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| text | string | required | — | The text or document extract to translate. |
| targetLanguage | string | required | — | Target language name or ISO code (e.g. "Hindi", "hi", "Bengali", "es"). |
| sourceLanguage | string | optional | "auto" | Source language name, code, or "auto" for automatic detection. |
| tone | string | optional | "simple" | Style register: "simple", "formal", "academic", or "casual". |
| targetLanguageNative | string | optional | — | Optional native script representation (e.g. "हिन्दी"). |
| apiKey | string | optional | — | Optional custom Gemini API key for dedicated private quota. |
Code Examples & Integration
curl -X POST "https://www.pdflanguagetranslators.com/api/translate" \
-H "Content-Type: application/json" \
-d '{
"text": "The annual financial statements confirm compliance with data protection laws.",
"targetLanguage": "Hindi",
"sourceLanguage": "English",
"tone": "formal"
}'import requests
url = "https://www.pdflanguagetranslators.com/api/translate"
payload = {
"text": "The annual financial statements confirm compliance with data protection laws.",
"targetLanguage": "Hindi",
"tone": "formal"
}
response = requests.post(url, json=payload)
data = response.json()
print("Translated:", data["translatedText"])const response = await fetch('https://www.pdflanguagetranslators.com/api/translate', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
text: 'The annual financial statements confirm compliance with data protection laws.',
targetLanguage: 'Hindi',
tone: 'formal'
})
});
const data = await response.json();
console.log('Result:', data.translatedText);Response Payloads
{
"success": true,
"originalText": "The annual financial statements...",
"translatedText": "वार्षिक वित्तीय विवरण डेटा सुरक्षा कानूनों के अनुपालन की पुष्टि करते हैं।",
"targetLanguage": "Hindi"
}{
"success": false,
"isBusy": true,
"retryAfter": 5,
"message": "The translation server is briefly busy. Pausing for a few seconds..."
}Model Context Protocol (MCP) Server for Autonomous Agents
Equip Claude Desktop, Cursor, Antigravity IDE, or any MCP-compatible agent to automatically translate documents with layout preservation. Add the following config to your claude_desktop_config.json or MCP configuration file:
{
"mcpServers": {
"pdf-language-translator": {
"command": "npx",
"args": ["-y", "pdf-language-translator-mcp"],
"env": {
"PDF_TRANSLATOR_API_URL": "https://www.pdflanguagetranslators.com/api/translate"
}
}
}
}