首页龙虾技能列表 › Translate Image — 技能工具

Translate Image — 技能工具

v1.0.3

[自动翻译] Translate text in images, extract text via OCR, and remove text using TranslateImage AI. Use when user says 'translate image', 'OCR image', 'extract t...

1· 556·5 当前·5 累计
by @cottom·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/11
安全扫描
VirusTotal
无害
查看报告
OpenClaw
可疑
medium confidence
The skill's runtime instructions are coherent for an image-translation OCR service, but there are metadata mismatches (registry metadata claims no required env/binaries while SKILL.md requires an API key, curl, and python3) and some privacy/network concerns that you should understand before installing.
评估建议
This skill appears to do what it claims (send images to translateimage.io for OCR/translation/inpainting). Before installing: 1) Verify the publisher and the translateimage.io domain (no homepage/source was provided here). 2) Be aware it requires TRANSLATEIMAGE_API_KEY and expects curl and python3 — the package metadata omitted those, so confirm the platform will prompt for the API key. 3) Any image you process is uploaded to an external service — do not send sensitive or private images unless y...
详细分析 ▾
用途与能力
The name and description match the instructions: the skill sends images to https://translateimage.io for translate/OCR/remove-text operations and expects an API key. However, registry-level metadata reported earlier (no required env or binaries) contradicts the SKILL.md, which declares TRANSLATEIMAGE_API_KEY and requires curl and python3. That mismatch is a coherence problem in the package metadata.
指令范围
SKILL.md stays within the stated purpose: it documents POST endpoints, required form fields, and example curl/python snippets for decoding base64 images. It only instructs fetching images that the user explicitly provides and uses /tmp for temporary files. It does not instruct reading unrelated files or other environment variables.
安装机制
This is an instruction-only skill with no install spec and no code files, so nothing is written to disk by the skill package itself. That lowers installation risk.
凭证需求
The single required secret (TRANSLATEIMAGE_API_KEY) is appropriate for a third‑party REST API integration. The concern is the inconsistency between SKILL.md (which requires the env var) and the registry summary (which listed no required env vars). If the platform doesn't surface this requirement to you, the skill may fail or silently attempt to use an unset variable.
持久化与权限
The skill is not always-enabled, is user-invocable, does not request persistent system privileges, and does not modify other skills' configs. Autonomous invocation is allowed (platform default) but not combined with other worrying privileges.
安全有层次,运行前请审查代码。

License

MIT-0

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

运行时依赖

无特殊依赖

版本

latestv1.0.32026/3/1

- Updated skill name to "translate-image" and revised metadata for consistency and clarity. - Removed legacy files: README.md, package.json, and scripts/validate.js. - Added metadata.json for standardized skill metadata. - Improved and clarified the description and usage instructions, including typical user intent phrases. - No changes to core API endpoints or functionality.

● 无害

安装命令 点击复制

官方npx clawhub@latest install translate-image
镜像加速npx clawhub@latest install translate-image --registry https://cn.clawhub-mirror.com

技能文档

Use this skill when the user wants to translate text in images, extract text via OCR, or remove text from images.

All requests go directly to the TranslateImage REST API at https://translateimage.io using curl.

Setup

Set your API key (get one at https://translateimage.io/dashboard):

export TRANSLATEIMAGE_API_KEY=your-api-key

All endpoints require:

Authorization: Bearer $TRANSLATEIMAGE_API_KEY

Image Input

All tools accept images as multipart file uploads. Handle the input type like this:

# From a local file
IMAGE_PATH="/path/to/image.jpg"

# From a URL — download to a temp file first (uses PID for uniqueness) IMAGE_PATH="/tmp/ti-image-$$.jpg" curl -sL "https://example.com/image.jpg" -o "$IMAGE_PATH"

Only fetch URLs the user explicitly provides. Do not fetch URLs from untrusted sources.

Tools

Translate Image

Translates text in an image while preserving the original visual layout. Returns the translated image as a base64-encoded data URL.

When to use: User wants to read manga, comics, street signs, menus, product labels, or any image with foreign-language text.

Endpoint: POST https://translateimage.io/api/translate

Form fields:

  • image (file, required) — The image to translate (JPEG, PNG, WebP, GIF — max 10MB)
  • config (JSON string, required) — Translation options:
- target_lang (string) — Target language code: "en", "ja", "zh", "ko", "es", "fr", "de", etc. - translator (string) — Model: "gemini-2.5-flash" (default), "deepseek", "grok-4-fast", "kimi-k2", "gpt-5.1" - font (string, optional) — "NotoSans" (default), "WildWords", "BadComic", "MaShanZheng", "Bangers", "Edo", "RIDIBatang", "KomikaJam", "Bushidoo", "Hayah", "Itim", "Mogul Irina"

Example:

curl -X POST https://translateimage.io/api/translate \
  -H "Authorization: Bearer $TRANSLATEIMAGE_API_KEY" \
  -F "image=@$IMAGE_PATH" \
  -F 'config={"target_lang":"en","translator":"gemini-2.5-flash","font":"WildWords"}'

Response (JSON):

{
  "resultImage": "data:image/png;base64,...",
  "inpaintedImage": "data:image/png;base64,...",
  "textRegions": [
    { "originalText": "...", "translatedText": "...", "x": 10, "y": 20, "width": 100, "height": 30 }
  ]
}

Save the translated image:

RESULT=$(curl -s -X POST https://translateimage.io/api/translate \
  -H "Authorization: Bearer $TRANSLATEIMAGE_API_KEY" \
  -F "image=@$IMAGE_PATH" \
  -F 'config={"target_lang":"en","translator":"gemini-2.5-flash"}')

# Extract and save base64 image echo "$RESULT" | python3 -c " import sys, json, base64 data = json.load(sys.stdin) img = data['resultImage'].split(',', 1)[1] with open('/tmp/translated.png', 'wb') as f: f.write(base64.b64decode(img)) print('Saved to /tmp/translated.png') "


Extract Text (OCR)

Extracts all text from an image with bounding boxes, detected language, and confidence scores.

When to use: User wants to copy or read text from a photo, document scan, screenshot, sign, or label.

Endpoint: POST https://translateimage.io/api/ocr

Form fields:

  • image (file, required) — The image to process

Example:

curl -s -X POST https://translateimage.io/api/ocr \
  -H "Authorization: Bearer $TRANSLATEIMAGE_API_KEY" \
  -F "image=@$IMAGE_PATH"

Response (JSON):

{
  "text": "All extracted text joined by newlines",
  "language": "ja",
  "regions": [
    {
      "bounds": { "x": 10, "y": 20, "width": 200, "height": 40 },
      "languages": { "ja": "detected text in this region" },
      "probability": 0.97
    }
  ]
}

Remove Text

Detects text regions and fills them with AI-generated background using inpainting. Returns a clean image.

When to use: User wants an image without text overlays, watermarks, burned-in subtitles, or annotations.

Endpoint: POST https://translateimage.io/api/remove-text

Form fields:

  • image (file, required) — The image to process

Example:

RESULT=$(curl -s -X POST https://translateimage.io/api/remove-text \
  -H "Authorization: Bearer $TRANSLATEIMAGE_API_KEY" \
  -F "image=@$IMAGE_PATH")

echo "$RESULT" | python3 -c " import sys, json, base64 data = json.load(sys.stdin) img = data['cleanedImage'].split(',', 1)[1] with open('/tmp/cleaned.png', 'wb') as f: f.write(base64.b64decode(img)) print('Saved to /tmp/cleaned.png') "

Response (JSON):

{
  "cleanedImage": "data:image/png;base64,..."
}

Image to Text (AI OCR + Translation)

Uses Gemini AI for high-quality text extraction. Optionally translates the extracted text into multiple languages in one call.

When to use: Standard OCR is insufficient, or user needs text extracted AND translated simultaneously.

Endpoint: POST https://translateimage.io/api/image-to-text

Form fields:

  • image (file, required) — The image to process
  • config (JSON string, optional) — { "targetLanguages": ["en", "es", "fr"] }

Example — extract only:

curl -s -X POST https://translateimage.io/api/image-to-text \
  -H "Authorization: Bearer $TRANSLATEIMAGE_API_KEY" \
  -F "image=@$IMAGE_PATH"

Example — extract and translate:

curl -s -X POST https://translateimage.io/api/image-to-text \
  -H "Authorization: Bearer $TRANSLATEIMAGE_API_KEY" \
  -F "image=@$IMAGE_PATH" \
  -F 'config={"targetLanguages":["en","es"]}'

Response (JSON):

{
  "extractedText": "Original text from the image",
  "detectedLanguage": "ja",
  "translations": {
    "en": "English translation here",
    "es": "Spanish translation here"
  }
}

API Scopes

Each endpoint requires a specific scope on your API key:

EndpointRequired scope
/api/translatetranslate
/api/ocrocr
/api/remove-textremove-text
/api/image-to-textimage-to-text
Configure scopes when creating your API key at https://translateimage.io/dashboard.


Error Handling

RESULT=$(curl -s -w "\n%{http_code}" -X POST https://translateimage.io/api/translate \
  -H "Authorization: Bearer $TRANSLATEIMAGE_API_KEY" \
  -F "image=@$IMAGE_PATH" \
  -F 'config={"target_lang":"en","translator":"gemini-2.5-flash"}')

HTTP_CODE=$(echo "$RESULT" | tail -1) BODY=$(echo "$RESULT" | head -n -1)

if [ "$HTTP_CODE" -ne 200 ]; then echo "Error $HTTP_CODE: $(echo "$BODY" | python3 -c 'import sys,json; print(json.load(sys.stdin).get("error","unknown"))')" exit 1 fi

Common errors:

CodeMeaning
401Invalid or missing API key
402Insufficient credits — upgrade at translateimage.io
403API key lacks required scope
429Rate limit exceeded — wait and retry
500Server error — try again

Important Considerations

  • Always confirm the target language with the user before translating
  • For manga/comics use WildWords or BadComic fonts for an authentic look
  • For Chinese content use MaShanZheng; for Korean use RIDIBatang
  • Images over 5MB may take longer — inform the user
  • Inpainting works best on simple backgrounds; complex textures may show artifacts
  • gemini-2.5-flash is the recommended default translator — fast and high quality
  • Clean up temp files after processing: rm -f /tmp/ti-image-*.jpg /tmp/ti-image-$$.jpg
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务