अあ
PDF Language Translator

www.pdflanguagetranslators.com

Developer Hub • OpenAPI 3.1 • MCP Protocol Supported

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.

POST /api/translate

Zero Retention

Memory-only translation. No document files or translated payloads are stored on server disk.

0-Byte Storage Policy

120+ Languages

Native script rendering for Indic, European, East Asian, and Middle Eastern languages.

Yuktakkhor Ligature Lock
POST/api/translate

Translate text or document extracts into any supported language.

application/json

Request Parameters

FieldTypeRequiredDefaultDescription
textstringrequiredThe text or document extract to translate.
targetLanguagestringrequiredTarget language name or ISO code (e.g. "Hindi", "hi", "Bengali", "es").
sourceLanguagestringoptional"auto"Source language name, code, or "auto" for automatic detection.
tonestringoptional"simple"Style register: "simple", "formal", "academic", or "casual".
targetLanguageNativestringoptionalOptional native script representation (e.g. "हिन्दी").
apiKeystringoptionalOptional custom Gemini API key for dedicated private quota.

Code Examples & Integration

cURL Request
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"
  }'
Python (requests)
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"])
Node.js / TypeScript
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

200 OKapplication/json
{
  "success": true,
  "originalText": "The annual financial statements...",
  "translatedText": "वार्षिक वित्तीय विवरण डेटा सुरक्षा कानूनों के अनुपालन की पुष्टि करते हैं।",
  "targetLanguage": "Hindi"
}
429 Rate Limit (Backoff)Retry-After header
{
  "success": false,
  "isBusy": true,
  "retryAfter": 5,
  "message": "The translation server is briefly busy. Pausing for a few seconds..."
}
AI AGENT INTEGRATION

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"
      }
    }
  }
}