name: suppr-translate description: 超能文獻(Suppr)文件翻譯 API。當用戶需要翻譯文件(Word、Excel、PowerPoint、PDF、TXT、HTML)、查詢翻譯狀態或管理翻譯任務時啟用。
超能文獻(Suppr)提供 AI 驅動的多語言文件翻譯服務,支援 Word、Excel、PowerPoint、PDF、TXT、HTML 等格式。
https://api.suppr.wilddata.cnAuthorization: Bearer <your_api_key>POST https://api.suppr.wilddata.cn/v1/translations
Content-Type: multipart/form-data
Authorization: Bearer <your_api_key>
引數:
| 引數 | 型別 | 必填 | 說明 |
|---|---|---|---|
| file | File | 與 file_url 二選一 | 要翻譯的文件檔案 |
| file_url | String | 與 file 二選一 | 文件的 URL 地址 |
| file_name | String | 否 | 使用 file_url 時指定檔名 |
| from_lang | String | 否 | 源語言程式碼,預設 auto(自動檢測) |
| to_lang | String | 是 | 目標語言程式碼 |
| optimize_math_formula | Boolean | 否 | 是否最佳化數學公式(僅 PDF 有效),預設 false |
僅支援 file_url 模式。
POST https://api.suppr.wilddata.cn/v1/translations
Content-Type: application/json
Authorization: Bearer <your_api_key>
{
"file_url": "https://example.com/document.docx",
"file_name": "document.docx",
"from_lang": "en",
"to_lang": "zh-cn",
"optimize_math_formula": false
}
GET https://api.suppr.wilddata.cn/v1/translations/{task_id}
Authorization: Bearer <your_api_key>
GET https://api.suppr.wilddata.cn/v1/translations?offset=0&limit=20
Authorization: Bearer <your_api_key>
查詢引數:
| 引數 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| offset | Integer | 0 | 分頁偏移量 |
| limit | Integer | 20 | 每頁數量(1-100) |
| task_id | String | - | 可選,若提供則返回單個任務 |
POST https://api.suppr.wilddata.cn/v1/translations/{task_id}/stop?reason=使用者取消
Authorization: Bearer <your_api_key>
| 格式 | 副檔名 |
|---|---|
| Word | .docx |
| Excel | .xlsx |
| PowerPoint | .pptx |
| 純文本 | .txt |
| 網頁 | .html |
最大檔案大小:2GB
| 程式碼 | 語言 |
|---|---|
| auto | 任意語言(僅 from_lang,自動檢測) |
| en | 英語 |
| zh-cn | 簡體中文 |
| zh-tw | 繁體中文 |
| ja | 日語 |
| ko | 韓語 |
| es | 西班牙語 |
| fr | 法語 |
| pt | 葡萄牙語 |
| ru | 俄語 |
| de | 德語 |
| pl | 波蘭語 |
| it | 義大利語 |
所有響應使用統一格式:
{
"code": 0,
"data": { ... },
"msg": ""
}
code 為 0 表示成功,非 0 表示錯誤。
| 狀態 | 說明 |
|---|---|
| INIT | 任務已建立,等待處理 |
| PROGRESS | 翻譯進行中 |
| DONE | 翻譯完成 |
| STOPPING | 正在停止 |
status 欄位DONE 時,從響應中的 target_file_url 下載譯文# 步驟 1:建立任務 curl -X POST https://api.suppr.wilddata.cn/v1/translations \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"file_url": "https://example.com/paper.pdf", "from_lang": "en", "to_lang": "zh-cn"}' # 步驟 2:查詢狀態(使用返回的 task_id) curl https://api.suppr.wilddata.cn/v1/translations/TASK_ID \ -H "Authorization: Bearer YOUR_API_KEY" # 步驟 3:當 status 為 DONE 時,從 target_file_url 下載譯文更多技能請訪問小蔥技能站7w4.net。
{
"code": 0,
"data": {
"task_id": "02a6c6d1-3f70-4a5a-80bc-971d53a37bb1",
"status": "INIT",
"consumed_point": 453,
"source_lang": "auto",
"target_lang": "ko",
"optimize_math_formula": false
},
"msg": ""
}
{
"code": 0,
"data": {
"task_id": "taskid-1234",
"status": "DONE",
"progress": 1,
"consumed_point": 453,
"source_file_name": "example.docx",
"source_file_url": "https://example.com/source.docx",
"target_file_url": "https://example.com/target.docx",
"source_lang": "auto",
"target_lang": "ko",
"error_msg": null,
"optimize_math_formula": false
},
"msg": ""
}
這是一個文件翻譯工具,支援翻譯 Word、Excel、PPT、PDF 等多種常見格式的文件。說明清晰、格式豐富,新手也能快速理解如何使用。優點是支援格式多、示例詳細;不足是錯誤提示不夠友好,遇到問題較難排查,且缺少翻譯次數限制等關鍵資訊說明。整體質量中規中矩,適合對文件翻譯有基礎需求的使用者使用。