Developer API

Document Translation API for PDF, Word, Excel, and PowerPoint

Use one asynchronous API for PDF, Word, Excel, and PowerPoint translation. Keep your integration simple: submit a file, poll status, then download the translated result.

POST/openapi/v1/pdf/tasks
POST/openapi/v1/office/tasks
GET/openapi/v1/tasks/{id}
GET/openapi/v1/tasks/{id}/download
Workflow

A predictable asynchronous workflow

The API returns quickly after a task is accepted. Your service stays in control while translation continues in the background.

01

Authenticate

Create an API key in the Developer Center. Keys are shown only once and can be revoked at any time.

02

Submit a document

Send a PDF or Office file with a target language and an Idempotency-Key to protect retries.

03

Poll and download

Check the task until it succeeds, then download the translated file from the result URL.

Capabilities

Built for document workflows

PDF translation

Submit native or scanned PDFs and retrieve a translated PDF when processing finishes.

Office translation

Translate DOCX, PPTX, and XLSX files while keeping the result ready for continued editing.

Shared credits

The API and web workspace use one credits balance, so teams can combine manual and automated workflows.

Use cases

Where a document translation API fits

Use the API when the unit of work is a complete file and the translated artifact must continue through a real business workflow.

SaaS and RPA workflows

Accept a customer document, create a background task, track its status, and return the translated file from your own product.

Knowledge bases and archives

A successful PDF task can also expose translated Markdown for retrieval, indexing, or controlled downstream processing.

Queues and recurring operations

Keep task IDs and idempotency keys in your job system so retries, progress, downloads, and audit records remain traceable.

Credits

Clear page-based billing

PDF and Office translation are charged at 1,500 credits per billable page. PDF uses physical pages; PPTX uses slides; DOCX uses embedded page count with a one-page fallback; XLSX uses worksheets.

API selection

Document translation API versus text translation API

A text API translates strings. A document API accepts the file, runs an asynchronous workflow, and returns a document artifact.

Decision point Document translation API Text translation API
InputA complete PDF, DOCX, PPTX, or XLSX fileExtracted strings or text segments
OutputTranslated PDF artifacts or an editable Office fileTranslated text or segments
WorkflowUpload, task ID, polling, result downloadSynchronous or batched text requests
Best fitSaaS, RPA, knowledge bases, document operationsUI copy, chat, short fields, or custom pipelines

Read the detailed selection guide: Document translation API vs. text translation API

MCP integration

Bring document translation into your AI workspace

Connect a dedicated API key in Codex or another compatible MCP client. Your AI workspace can check credits, create document translation tasks, poll progress, and retrieve short-lived result links without leaving its normal flow.

Remote MCPhttps://www.fanyipaiban.com/translate/mcp
Codex

Codex: use the verified installer to register the local stdio bridge, restart Codex, then verify account and pricing in a new task.

Claude / Cursor / Trae

Other clients: use the local bridge or a supported Streamable HTTP configuration that can attach Authorization: Bearer <API_KEY>.

The same page-based credits price applies. PDF, DOCX, PPTX, and XLSX are supported. For a local file above 20 MB, use the REST API upload flow.

FAQ

Document translation API questions

How is a document translation API different from a text translation API?

A text translation API accepts strings and returns translated strings. A document translation API accepts a complete file, manages an asynchronous task, and returns a translated PDF artifact or an editable Office file, so the caller does not need to build the entire extraction and file-reconstruction workflow.

Which file formats does the public REST API support?

The current public REST API supports PDF, DOCX, PPTX, and XLSX. PDF and Office use separate creation endpoints, then share the same task polling and primary result download endpoints.

Does the API preserve every part of the original layout?

The service returns translated PDF artifacts or editable Office files, but complex scans, formulas, tables, diagrams, fonts, and dense layouts still require review. Test a representative document before automating a production workflow.

How should a batch workflow handle retries?

Create one Idempotency-Key per business operation, save data.id after HTTP 202, and poll the existing task. Reuse the same key only when a network failure leaves the creation outcome unknown; after an explicit pre-task failure, fix the cause and use a new key.

Should I use REST API or MCP?

Use REST API for backend services, job queues, large files, and batch operations. Use MCP when a document is already in an AI workspace such as Codex and the current 20 MB local-file limit is sufficient. Both use the same account and credits balance.

Start with the integration guide

Use the public Quickstart to run one real upload, read data.id, poll the task, and download the result before building a production integration.

Read the 5-minute Quickstart

Run the full workflow with a real document

Upload a PDF, Word, Excel, PPT, EPUB, SRT, or IDML file to check translation, structure retention, bilingual review, and export quality.

滚动至顶部