xdoc-translationx

v1.0.0

Translate documents and text between multiple languages with support for glossaries, translation memory, and various file formats via Xdoc Translation API.

0· 155·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for yangsongbai1/xdoc-translationx.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "xdoc-translationx" (yangsongbai1/xdoc-translationx) from ClawHub.
Skill page: https://clawhub.ai/yangsongbai1/xdoc-translationx
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install xdoc-translationx

ClawHub CLI

Package manager switcher

npx clawhub@latest install xdoc-translationx
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description, manifest, and SKILL.md all describe a document/text translation API. The only declared credential is XDOC_API_KEY and the endpoints listed (files/create_upload_url, translate/document, text/translate, glossary/memory endpoints, etc.) align with the stated capabilities.
Instruction Scope
SKILL.md instructs the agent to obtain an API key, create upload URLs, upload user files, submit translations, poll status, and download results. It does not direct reading of unrelated system files, other environment variables, or transmission to third-party endpoints outside translation.x-doc.ai. It reminds users to keep API keys private.
Install Mechanism
This is an instruction-only skill with no install spec and no code files, so nothing is written to disk and no external packages are fetched. That minimizes install-time risk.
Credentials
Only one required environment credential (XDOC_API_KEY) is declared and used. That is proportional and expected for an API-based translation service. No unrelated secrets or config paths are requested.
Persistence & Privilege
Permissions show always: false. disable-model-invocation is false (agent may invoke autonomously), which is the platform default and not inherently a concern for this coherent skill. The skill does not request system-wide configuration changes.
Assessment
This skill appears coherent with its stated purpose, but before installing: 1) Verify the domain (translation.x-doc.ai / x-doc.ai) is the legitimate vendor and that you trust their privacy policy and 7-day retention claim. 2) Only provide an API key created for this purpose; do not paste keys into public logs. 3) Avoid uploading highly sensitive data unless you're comfortable with the vendor's retention/processing and have confirmed any compliance needs (PII, regulated data). 4) Test with non-sensitive files first to confirm behavior and billing/quota impact. 5) If you need strict control over data, prefer an on-prem or enterprise solution or confirm data-deletion workflows and key revocation procedures. 6) Note the skill can be invoked autonomously by the agent (normal default); if you want manual control, disable autonomous invocation in your agent settings.

Like a lobster shell, security has layers — review code before you run it.

latestvk97267682qk9a4yfwxs6m7hs7h832e6w
155downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

Xdoc Translation API Skill

You are a document translation assistant powered by the Xdoc Translation API. This skill enables you to translate documents and text between multiple languages.


Authentication & API Key

How to Get an API Key

  1. Visit https://translation.x-doc.ai/
  2. Sign up or log in to your account
  3. Navigate to UserAPI ManagementMy API
  4. Click Create API Key and copy your key
  5. Store the API key securely (it will only be shown once)

Required Credential

VariableDescriptionRequired
XDOC_API_KEYYour Xdoc API keyYes

The API key must be provided as an environment variable XDOC_API_KEY or passed via the x-api-key HTTP header.

Security Notes

  • Never share your API key in public repositories or logs
  • API keys are tied to your account and usage quota
  • You can revoke and regenerate keys at any time from the dashboard
  • All API requests are encrypted via HTTPS

Service Information

PropertyValue
ProviderXdoc (https://x-doc.ai)
API Base URLhttps://translation.x-doc.ai/api/open_api/v1
Supportsupport@x-doc.ai

Core Workflow

Document Translation Flow

1. Create Upload URL → 2. Upload File → 3. Submit Translation → 4. Poll Status → 5. Download Result

Step-by-Step:

  1. Create Upload URL

    POST /files/create_upload_url
    Headers: x-api-key: <your_api_key>
    Body: {"filename": "report.docx", "is_can_edit": true}
    Returns: file_id, upload_url, content_type
    
  2. Upload File

    • Option A: User uploads via upload_page_url in browser (drag-and-drop)
    • Option B: PUT request to upload_url with file content
  3. Submit Translation

    POST /translate/document
    Headers: x-api-key: <your_api_key>
    Body: {
      "file_id": 123456789,
      "source_language": "en",
      "target_language": "zh-cn",
      "trans_mode": "master"
    }
    
  4. Poll Status (every 3-5 seconds)

    POST /translate/status
    Headers: x-api-key: <your_api_key>
    Body: {"file_id": "123456789"}
    Returns: status_name (parsing/translating/compositing/completed)
    
  5. Download Translation

    • When status_name == "completed", response includes download_url

API Capabilities

Document Translation

FunctionEndpointMethod
Create Upload URL/files/create_upload_urlPOST
Submit Translation/translate/documentPOST
Check Status/translate/statusPOST
Delete File/files/deletePOST

Text Translation

FunctionEndpointMethod
Instant Translate/text/translatePOST

Glossary (Term Library)

FunctionEndpointMethod
Create Glossary/term-libs/createPOST
List Glossaries/term-libs/listPOST
Edit Glossary/term-libs/editPOST
Delete Glossary/term-libs/deletePOST
Add Terms/term-entries/addPOST
List Terms/term-entries/listPOST
Edit Term/term-entries/editPOST
Delete Terms/term-entries/deletePOST

Translation Memory

FunctionEndpointMethod
Create Memory/memory-libs/createPOST
List Memories/memory-libs/listPOST
Edit Memory/memory-libs/editPOST
Delete Memory/memory-libs/deletePOST
Add Entries/memory-entries/addPOST
List Entries/memory-entries/listPOST
Edit Entry/memory-entries/editPOST
Delete Entries/memory-entries/deletePOST

Utility

FunctionEndpointMethod
Get Supported Languages/languagesGET

Usage Guide

Translation Modes

  • deep: Standard quality, faster processing
  • master: Premium quality, recommended for professional use

Supported File Formats

docx, doc, pdf, pptx, ppt, xlsx, xls, txt, xml

PDF Handling

  • Editable PDF (with selectable text): is_can_edit: true
  • Scanned/Image PDF: is_can_edit: false (enables OCR)

Using Glossaries

Ensure consistent terminology by specifying glossary IDs:

{
  "file_id": 123456789,
  "source_language": "en",
  "target_language": "zh-cn",
  "term_lib_ids": [1, 2]
}

Using Translation Memory

Reuse previous translations with memory libraries:

{
  "file_id": 123456789,
  "source_language": "en",
  "target_language": "zh-cn",
  "memory_libs": [
    {"memory_lib_id": 1, "threshold": 0.8}
  ]
}
  • threshold: Match threshold, 0-1, default 0.8

Status Reference

Translation Status Flow

parsing → pending → translating → compositing → completed
    ↓         ↓           ↓
parse_failed  ...   translation_failed

Status Definitions

StatusMeaningAction
parsingParsing documentContinue polling
pendingWaiting for translationContinue polling
translatingTranslation in progressContinue polling
compositingGenerating output fileContinue polling
completedDoneGet download_url
parse_failedParse errorCheck file format
translation_failedTranslation errorRetry or contact support

Language Codes

CodeLanguageCodeLanguage
enEnglishzh-cnChinese (Simplified)
jaJapanesekoKorean
deGermanfrFrench
esSpanishptPortuguese
ruRussianarArabic
thThaiviVietnamese
zh-twChinese (Traditional)itItalian

Use /languages endpoint for the complete list.


Example Scenarios

Scenario 1: Translate a Word Document

User: Translate report.docx from English to Chinese

Steps:
1. Call create_upload_url to get upload info
2. Provide upload_page_url to user for upload, or upload directly
3. Call translate_document to submit translation
4. Poll translate/status until completed
5. Return download_url to user

Scenario 2: Instant Text Translation

User: Translate "Hello World" to Japanese

Call:
POST /text/translate
{"text": "Hello World", "source_language": "en", "target_language": "ja"}

Returns: "こんにちは世界"

Scenario 3: Translate with Glossary

1. Create glossary and add terms
2. Specify term_lib_ids when translating
3. Ensures consistent translation of technical terms

Error Handling

All API responses follow this format:

{
  "code": 0,
  "message": "success",
  "data": { ... }
}

Success

CodeMessageDescription
0successRequest completed successfully

Authentication Errors (910xx)

CodeMessageResolution
91000API Key is requiredAdd x-api-key header
91001Invalid API KeyCheck your API key is correct
91002API Key has expiredRenew your API key
91003API Key is disabledContact support or create new key
91004API Key is not yet effectiveWait until the key activation date
91005Customer not foundVerify your account status
91006Rate limit exceededReduce request frequency, retry later

File Translation Errors (911xx)

CodeMessageResolution
91100File size exceeds the limitReduce file size (max 50MB)
91101File type not supportedUse supported formats: docx, pdf, pptx, xlsx, txt, xml
91102File upload failedRetry upload
91103File not foundVerify file_id is correct
91104File status does not allow this operationCheck current file status
91105Insufficient account balanceTop up your account
91107Task not foundVerify task_id is correct
91108Task not completed, cannot downloadWait for translation to complete
91109Translated file not foundRetry translation
91110Failed to get download URLRetry later
91111File is being translated, cannot operateWait for current translation to finish
91112File has not been uploaded yetUpload file before submitting translation

Glossary Errors (912xx)

CodeMessageResolution
91200Term library name already existsUse a different name
91201Term library not foundVerify term_lib_id is correct
91202Source term already existsUpdate existing term instead
91203Term entry not foundVerify entry_id is correct
91204Entry list cannot be emptyProvide at least one entry

Translation Memory Errors (913xx)

CodeMessageResolution
91300Memory library name already existsUse a different name
91301Memory library not foundVerify memory_lib_id is correct
91302Memory entry not foundVerify entry_id is correct
91303Entry list cannot be emptyProvide at least one entry

Text Translation Errors (915xx)

CodeMessageResolution
91500Text exceeds model token limitReduce text length (max 5000 chars)
91501Translation service errorRetry later
91502Translation returned empty resultCheck source text is valid

Best Practices

  1. Polling Interval: Wait 3-5 seconds between status checks
  2. File Size: Recommended max 50MB per file
  3. Concurrency: Max 10 simultaneous translation tasks
  4. Glossaries: Use same glossary for documents in the same domain
  5. Memory Maintenance: Regularly clean outdated translation memories

Privacy & Data Handling

  • Data Encryption: All data transmitted via HTTPS/TLS
  • Data Retention: Uploaded files are automatically deleted after 7 days
  • No Third-Party Sharing: Your documents are not shared with third parties
  • Compliance: Service complies with GDPR and data protection regulations
  • Data Location: Files are processed and stored in secure cloud infrastructure

For privacy policy details, visit: https://x-doc.ai/privacy

Comments

Loading comments...