超能文献(Suppr)文档翻译 API。当用户需要翻译文档(Word、Excel、PowerPoint、PDF、TXT、HTML),查询翻译状态或管理翻译任务时激活。
APIQ(Suppr) – AI QQ, excel是一项面向实际任务的技能,主要用于Excel是一项围绕特定任务主题设计的实用技能。它会根据用户给出的目标、输入材料和运行环境,组织必要的处理步骤,调用适合的工具或接口,并把执行结果整理成便于检查和继续使用的形式。
涉及外部服务、账号权限和敏感数据时,还应遵守相应的安全要求。从功能定位来看,该技能强调把分散的操作要求整理成清晰、可复用的处理流程,使用户能够围绕既定目标快速准备输入、选择执行方式并获得结构化结果。实际使用前应先确认任务范围、数据来源、运行环境、必要权限和关键参数,再依据技能说明逐步执行;
若输入条件不完整,应先补齐信息或采用保守配置,避免因错误假设导致结果偏离需求。执行过程中需要关注工具调用是否成功、接口或依赖是否可用、输出格式是否符合预期,并对异常提示、缺失字段和边界情况进行处理;涉及批量任务时,还应保存进度,避免中断后重复操作。
超能文献(Suppr)提供 AI 驱动的多语言文档翻译服务,支持 Word、Excel、PowerPoint、PDF、TXT、HTML 等格式。
https://api.suppr.wilddata.cnAuthorization: Bearer POST https://api.suppr.wilddata.cn/v1/translations Content-Type: multipart/form-data Authorization: Bearer
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| 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{ "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
GET https://api.suppr.wilddata.cn/v1/translations?offset=0&limit=20 Authorization: Bearer
查询参数:
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 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
| 格式 | 扩展名 |
|---|---|
| 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 下载译文
{
"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": ""
}
相关专题
热门下载
相关下载
精品课程
共6课时 | 54.7万人学习
共89课时 | 134.1万人学习
共49课时 | 82.6万人学习