← 返回 Skills 市场
leoking

Image Translator

作者 piclaza · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
436
总下载
2
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install image-translator
功能描述
Translate text or extract and translate text from images or image URLs using multiple engines including Baidu, Google, DeepL, and ChatGPT, supporting batch p...
使用说明 (SKILL.md)

象寄翻译服务

象寄翻译服务提供高质量的文本翻译和图片翻译功能,支持多种翻译引擎,覆盖全球多种语言。

官方资源

功能特点

  • 文本翻译: 支持多语言文本翻译,可选择不同翻译引擎
  • 图片翻译: 智能识别图片中的文字并翻译,支持本地文件和URL两种方式
  • 批量处理: 支持批量翻译多张图片
  • 多种引擎: 支持阿里云、Google、百度、DeepL、ChatGPT 等多种翻译引擎

前置条件

使用前需要获取以下密钥:

密钥类型 说明 用途
TextTransKey 文本翻译密钥 文本翻译,在请求头 X-API-Key 中传递
ImgTransKey 图片翻译服务标识码 图片翻译,用于签名计算
UserKey 用户密钥 图片翻译,用于签名计算

获取密钥: 登录 象寄控制台 获取相关密钥。


文本翻译

使用 scripts/text_translate.py 进行文本翻译。

基本用法

python scripts/text_translate.py \
  --api-key YOUR_TEXT_TRANS_KEY \
  --texts "你好世界" \
  --source-language CHS \
  --target-language ENG

批量翻译

python scripts/text_translate.py \
  --api-key YOUR_TEXT_TRANS_KEY \
  --texts "你好世界" "今天天气很好" "欢迎使用象寄翻译" \
  --source-language CHS \
  --target-language ENG

指定翻译引擎

python scripts/text_translate.py \
  --api-key YOUR_TEXT_TRANS_KEY \
  --texts "Hello, how are you?" \
  --source-language ENG \
  --target-language CHS \
  --vendor DeepL

参数说明

参数 必填 说明
--api-key 文本翻译密钥 (TextTransKey)
--texts 要翻译的文本(可多个,空格分隔)
--source-language 源语言代码
--target-language 目标语言代码
--vendor 翻译引擎,可选值见下表

支持的翻译引擎

Vendor 说明
Aliyun 阿里云翻译
Google Google 翻译
Papago Papago 翻译(韩语优势)
Baidu 百度翻译
DeepL DeepL 翻译(欧洲语言优势)
Chatgpt ChatGPT 翻译
GoogleLLM Google 大模型翻译

图片翻译

使用 scripts/image_translate.py 进行图片翻译,支持本地文件和 URL 两种方式。

本地文件翻译

翻译本地图片文件中的文字:

python scripts/image_translate.py \
  --img-key YOUR_IMG_TRANS_KEY \
  --user-key YOUR_USER_KEY \
  --file /path/to/image.png \
  --source-language JPN \
  --target-language ENG

URL 翻译(批量)

翻译网络图片(支持批量):

python scripts/image_translate.py \
  --img-key YOUR_IMG_TRANS_KEY \
  --user-key YOUR_USER_KEY \
  --urls "https://example.com/image1.jpg" "https://example.com/image2.jpg" \
  --source-language CHS \
  --target-language ENG

高质量翻译

使用 BestQuality 模式获得更高质量的翻译结果:

python scripts/image_translate.py \
  --img-key YOUR_IMG_TRANS_KEY \
  --user-key YOUR_USER_KEY \
  --file /path/to/image.png \
  --source-language JPN \
  --target-language ENG \
  --qos BestQuality

参数说明

参数 必填 说明
--img-key 图片翻译服务标识码 (ImgTransKey)
--user-key 用户密钥 (UserKey),用于签名
--file 二选一 本地图片文件路径
--urls 二选一 图片 URL 列表(可多个,空格分隔)
--source-language 源语言代码
--target-language 目标语言代码
--qos 翻译质量:LowLatency(偏好速度)或 BestQuality(偏好质量)
--need-watermark 是否添加水印:1=是,0=否(默认 1)
--need-rm-url 是否返回去文字图片链接:1=是
--engine-type 翻译引擎类型(5=ChatGPT)
--sync URL 翻译时:1=同步返回(默认),2=异步返回

签名计算

图片翻译接口需要签名验证,签名方法:

Sign = md5(CommitTime + "_" + UserKey + "_" + ImgTransKey).lower()

脚本会自动计算签名,只需提供 --user-key--img-key


支持的语言

常用语言代码

代码 语言 代码 语言
CHS 中文简体 CHT 中文繁体
ENG 英语 JPN 日语
KOR 韩语 DEU 德语
FRA 法语 ESP 西班牙语
RUS 俄语 PT 葡萄牙语
ITA 意大利语 TH 泰语
VIN 越南语 ID 印尼语

完整语言列表见 references/languages.md


API 端点

功能 端点
文本翻译 POST https://api.tosoiot.com/task/v1/text/translate
图片翻译(文件) POST https://api2.tosoiot.com/
图片翻译(URL 批量) POST https://api.tosoiot.com/

错误码

Code 说明
200 响应成功
101 请求超时
102 系统错误
104 参数错误
105 该语向不支持
107 翻译错误
110 账号没有开通服务
113 账号服务没有开通或者欠费
120 额度不足

使用示例

示例 1:翻译日文图片为英文

python scripts/image_translate.py \
  --img-key YOUR_IMG_KEY \
  --user-key YOUR_USER_KEY \
  --file /path/to/japanese_manga.png \
  --source-language JPN \
  --target-language ENG \
  --qos BestQuality

示例 2:翻译中文文本为日语

python scripts/text_translate.py \
  --api-key YOUR_API_KEY \
  --texts "你好,欢迎使用象寄翻译服务" \
  --source-language CHS \
  --target-language JPN \
  --vendor Chatgpt

示例 3:批量翻译电商图片

python scripts/image_translate.py \
  --img-key YOUR_IMG_KEY \
  --user-key YOUR_USER_KEY \
  --urls "https://example.com/product1.jpg" "https://example.com/product2.jpg" \
  --source-language CHS \
  --target-language ENG

示例 4:使用 DeepL 翻译欧洲语言

python scripts/text_translate.py \
  --api-key YOUR_API_KEY \
  --texts "Guten Tag, wie geht es Ihnen?" \
  --source-language DEU \
  --target-language FRA \
  --vendor DeepL

联系方式

如有问题或需要技术支持,请通过以下方式联系:

安全使用建议
This skill will upload the text and image data you provide to external endpoints (api.tosoiot.com / api2.tosoiot.com) for translation — do not use it with sensitive images or confidential text unless you trust that service. Note the documentation in SKILL.md references xiangjifanyi.com while the scripts use tos oiot.com domains; verify which domain is authoritative (check TLS certs, service docs, or contact vendor). The scripts accept required keys as CLI arguments (not environment variables) — ensure you keep those keys secret and confirm the service's privacy/billing policies before sending lots of data. If you want stronger guarantees, prefer using the official vendor SDK/API endpoints you trust (e.g., Google/DeepL) or run local OCR/translation pipelines.
功能分析
Type: OpenClaw Skill Name: image-translator Version: 1.0.0 The skill is classified as suspicious due to the use of `subprocess.run` to execute `curl` in `scripts/image_translate.py` for handling file uploads. While arguments are passed as a list, which mitigates direct shell injection, relying on an external command like `curl` for user-controlled inputs (such as `file_path`) introduces a potential vulnerability for argument injection into `curl` itself or unexpected behavior with specially crafted filenames. This represents a risky capability without clear evidence of intentional malicious behavior like data exfiltration to unauthorized endpoints or backdoor installation. All API endpoints (`https://api.tosoiot.com`, `https://api2.tosoiot.com`) are consistent with the stated purpose.
能力评估
Purpose & Capability
The scripts implement text and image translation as described (text POST to a translation API; image upload or URL-batch endpoints). However, SKILL.md advertises xiangjifanyi.com and openapi-doc.xiangjifanyi.com while the actual API endpoints used in code are api.tosoiot.com and api2.tosoiot.com — domain mismatch that could indicate outdated docs, a proxy service, or mislabeling. The skill does not request unrelated capabilities (no AWS, etc.).
Instruction Scope
Runtime instructions direct running the included Python scripts which: (a) POST text to https://api.tosoiot.com/task/v1/text/translate, and (b) upload local image files (via curl subprocess) to https://api2.tosoiot.com or POST URL batches to https://api.tosoiot.com. These actions will send entire image contents and text to external servers (expected for translation but privacy-sensitive). The scripts do not read arbitrary system config files or other environment variables.
Install Mechanism
No install spec is provided (instruction-only with included scripts). No downloads or archive extractions occur at install time; the files are plain Python scripts and a language reference file — low install risk.
Credentials
The skill does not declare required environment variables in the registry metadata, but SKILL.md and the scripts require API keys (TextTransKey, ImgTransKey, UserKey) as CLI arguments. Requiring service API keys is proportional, but the registry metadata not declaring them is an inconsistency and reduces transparency. No unrelated secrets are requested.
Persistence & Privilege
The skill does not request always: true and does not attempt to modify other skills or system-wide config. It runs only when invoked.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install image-translator
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /image-translator 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- 完全重构 skill,定位为“象寄翻译服务”,支持文本与图片翻译,覆盖多种翻译引擎和语言。 - 新增详细 API 密钥说明与签名机制,明确前置条件和使用安全指引。 - 增加图片翻译、批量处理、指定质量与多引擎用法说明。 - 支持本地文件、URL 批量图片翻译及参数详解。 - 丰富常用语言代码表及错误码说明,便于查阅。 - 删除原有图片优化、格式指南等内容,专注翻译服务领域。
元数据
Slug image-translator
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Image Translator 是什么?

Translate text or extract and translate text from images or image URLs using multiple engines including Baidu, Google, DeepL, and ChatGPT, supporting batch p... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 436 次。

如何安装 Image Translator?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install image-translator」即可一键安装,无需额外配置。

Image Translator 是免费的吗?

是的,Image Translator 完全免费(开源免费),可自由下载、安装和使用。

Image Translator 支持哪些平台?

Image Translator 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Image Translator?

由 piclaza(@leoking)开发并维护,当前版本 v1.0.0。

💬 留言讨论