← Back to Skills Marketplace
jcdentoncore

Image Translator 1.0.0

by JCDentonCore · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
71
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install image-translator-1-0-0
Description
Translate text and images between multiple languages using various engines like Baidu, Google, DeepL, and ChatGPT, supporting batch and high-quality modes.
README (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

联系方式

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

Usage Guidance
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 host. The skill metadata did not declare curl as a required binary. - The tool requires you to supply service keys (TextTransKey, ImgTransKey, UserKey). These keys will be sent to the remote API; only use keys you intend to share with this third-party service and avoid reusing high-privilege credentials. - Review the service's privacy/terms on the vendor website (links are in SKILL.md) to understand how uploaded images/text are stored or processed. - Minor metadata oddities (owner/published timestamps and the differing domains) are not proof of maliciousness but are worth verifying with the skill author or vendor if you need higher assurance.
Capability Analysis
Type: OpenClaw Skill Name: image-translator-1-0-0 Version: 1.0.0 The skill bundle provides a functional interface for the Xiangji translation service, allowing for text and image translation. The scripts `image_translate.py` and `text_translate.py` correctly implement the service's API requirements, including MD5 signature calculation and interaction with the official API endpoints (tosoiot.com). While `image_translate.py` utilizes `subprocess` to execute `curl` for multipart file uploads, it does so using a list of arguments to prevent shell injection, and the behavior is entirely consistent with the tool's stated purpose of uploading images for translation.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
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.
Instruction Scope
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.
Install Mechanism
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.
Credentials
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.
Persistence & Privilege
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).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install image-translator-1-0-0
  3. After installation, invoke the skill by name or use /image-translator-1-0-0
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- 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
Metadata
Slug image-translator-1-0-0
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Image Translator 1.0.0?

Translate text and images between multiple languages using various engines like Baidu, Google, DeepL, and ChatGPT, supporting batch and high-quality modes. It is an AI Agent Skill for Claude Code / OpenClaw, with 71 downloads so far.

How do I install Image Translator 1.0.0?

Run "/install image-translator-1-0-0" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Image Translator 1.0.0 free?

Yes, Image Translator 1.0.0 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Image Translator 1.0.0 support?

Image Translator 1.0.0 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Image Translator 1.0.0?

It is built and maintained by JCDentonCore (@jcdentoncore); the current version is v1.0.0.

💬 Comments