Translate a document
translate_documentTranslate documents between languages while keeping layout, tables, images and formulas intact. Accepts common file formats and saves the translated copy next to the source.
Instructions
Translate a document into another language while keeping its layout, tables, images and formulas. Takes .docx, .pdf, .pptx, .xlsx, .epub, .html and .txt. Saves the result next to the source and returns its path. COSTS CREDITS at 10 per 1,000 words processed (10 minimum) - say so and get agreement first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"document_path": "<document_path>",
"target_lang": "<target_lang>"
},
"name": "translate_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output_path | No | Where to write the result; defaults to beside the source | |
| source_lang | No | Source language, or auto to detect it (the default) | |
| target_lang | Yes | Target language: zh, en, zh-tw, ja, ko, es, fr, pt, ru, de, pl or it | |
| wait_seconds | No | How long to wait before returning a job id (default 55) | |
| document_path | Yes | Absolute path to the document |