Authenticate
Create an API key in the Developer Center. Keys are shown only once and can be revoked at any time.
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.
/openapi/v1/pdf/tasks/openapi/v1/office/tasks/openapi/v1/tasks/{id}/openapi/v1/tasks/{id}/downloadThe API returns quickly after a task is accepted. Your service stays in control while translation continues in the background.
Create an API key in the Developer Center. Keys are shown only once and can be revoked at any time.
Send a PDF or Office file with a target language and an Idempotency-Key to protect retries.
Check the task until it succeeds, then download the translated file from the result URL.
Submit native or scanned PDFs and retrieve a translated PDF when processing finishes.
Translate DOCX, PPTX, and XLSX files while keeping the result ready for continued editing.
The API and web workspace use one credits balance, so teams can combine manual and automated workflows.
Use the API when the unit of work is a complete file and the translated artifact must continue through a real business workflow.
Accept a customer document, create a background task, track its status, and return the translated file from your own product.
A successful PDF task can also expose translated Markdown for retrieval, indexing, or controlled downstream processing.
Keep task IDs and idempotency keys in your job system so retries, progress, downloads, and audit records remain traceable.
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.
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 |
|---|---|---|
| Input | A complete PDF, DOCX, PPTX, or XLSX file | Extracted strings or text segments |
| Output | Translated PDF artifacts or an editable Office file | Translated text or segments |
| Workflow | Upload, task ID, polling, result download | Synchronous or batched text requests |
| Best fit | SaaS, RPA, knowledge bases, document operations | UI copy, chat, short fields, or custom pipelines |
Read the detailed selection guide: Document translation API vs. text translation API
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.
https://www.fanyipaiban.com/translate/mcpCodex: use the verified installer to register the local stdio bridge, restart Codex, then verify account and pricing in a new task.
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.
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.
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.
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.
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.
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.
Use the public Quickstart to run one real upload, read data.id, poll the task, and download the result before building a production integration.
Upload a PDF, Word, Excel, PPT, EPUB, SRT, or IDML file to check translation, structure retention, bilingual review, and export quality.