📦 Image Translator 1.0.0 — 技能工具

v1.0.0

Translate text and images between multiple languages using various engines like Baidu, Google, DeepL, and ChatGPT, supporting batch and high-quality modes.

0· 20·1 当前·1 累计
jcdentoncore 头像by @jcdentoncore (JCDentonCore)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/16
0
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
medium confidence
The skill's code and instructions align with an image/text translation service, but there are small mismatches you should be aware of before use (missing declared binary and different API hostnames).
评估建议
This package appears to implement a legitimate translation tool, but check a few things before installing or running it: - Ensure you trust the remote API hosts (api.tosoiot.com and api2.tosoiot.com). The SKILL.md mentions xiangjifanyi.com as the service/site, while the scripts post to tosioit domains — confirm these are correct and trusted endpoints for your keys and data. - The image upload script uses the local curl binary (subprocess.run(['curl', ...])). Make sure curl is available on the h...
详细分析 ▾
用途与能力
The name/description match the included scripts: both text_translate.py and image_translate.py implement calls to remote translation APIs. However, the runtime scripts invoke the curl binary for file uploads while the skill metadata lists no required binaries — curl is therefore a missing declared requirement. Otherwise the requested inputs (API keys, image file or URLs) are consistent with a translator.
指令范围
SKILL.md and the scripts limit actions to uploading text/images and receiving translation responses. The instructions ask the user to provide API keys (via CLI args) and do not instruct reading unrelated local files or environment variables. The scripts only send data to the declared API endpoints; they do not attempt to access other system secrets.
安装机制
There is no install spec (instruction + scripts only), so nothing is downloaded or written during install. The scripts run using standard Python libraries and subprocess/curl for file uploads; no external packages or archive downloads are performed.
凭证需求
The skill requires translation service keys (passed as CLI args) which is proportionate to the task. It does not demand unrelated environment variables or credentials. Keys are used to compute a simple MD5-based signature and to authenticate API calls.
持久化与权限
The skill does not request persistent/always-on privileges and does not modify other skills or system-wide configuration. Normal autonomous invocation settings remain unchanged (default).
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/4/16

- Initial release of xiangji-service (象寄翻译服务) skill - Supports high-quality text and image translation across multiple languages - Enables choice of translation engines: Baidu, Aliyun, Google, DeepL, ChatGPT, etc. - Provides batch translation for both text and images (local files or URLs) - Includes detailed usage instructions, parameter options, supported languages, and example commands - API endpoints and error codes are documented for developer integration

无害

安装命令

点击复制
官方npx clawhub@latest install image-translator-1-0-0
镜像加速npx clawhub@latest install image-translator-1-0-0 --registry https://cn.longxiaskill.com

技能文档

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

官方资源

  • 官网: https://www.xiangjifanyi.com/
  • API 文档: https://openapi-doc.xiangjifanyi.com/
  • 微信客服: xiangjifanyi(扫码或直接添加微信在线客服)

功能特点

  • 文本翻译: 支持多语言文本翻译,可选择不同翻译引擎
  • 图片翻译: 智能识别图片中的文字并翻译,支持本地文件和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阿里云翻译
GoogleGoogle 翻译
PapagoPapago 翻译(韩语优势)
Baidu百度翻译
DeepLDeepL 翻译(欧洲语言优势)
ChatgptChatGPT 翻译
GoogleLLMGoogle 大模型翻译

图片翻译

使用 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)
--syncURL 翻译时: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

联系方式

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

  • 微信客服: xiangjifanyi(扫码或直接添加微信在线客服)
  • 官网: https://www.xiangjifanyi.com/
  • API 文档: https://openapi-doc.xiangjifanyi.com/
数据来源ClawHub ↗ · 中文优化:龙虾技能库