OCR Space: Free OCR API

v1.0.0

调用 OCR.space 免费 API 识别图片中的文字

2· 987·8 current·8 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match implementation: the script posts images to https://api.ocr.space/parse/image using the free test key ('helloworld') and returns parsed text. No unrelated services, binaries, or credentials are requested.
Instruction Scope
SKILL.md and the script confine actions to reading the provided image path (or accepting base64), optionally compressing it, and POSTing it to the OCR.space API. There are no instructions to read other system files, environment secrets, or to exfiltrate data to unexpected endpoints.
Install Mechanism
No install spec (instruction-only) and no network downloads, which is low risk. However the included Python script requires third-party packages ('requests' and Pillow) that are not declared in the metadata or SKILL.md; the skill will fail or raise import errors unless those are installed.
Credentials
No environment variables or credentials are required. The script hardcodes API_KEY='helloworld' (the documented free test key) which matches the SKILL.md. If a user wants to use a private paid key they would need to change the script or add a mechanism to supply it.
Persistence & Privilege
Skill is not always-enabled, does not request persistent platform-wide privileges, and does not modify other skills or global agent settings.
Assessment
This skill appears to do what it says: it reads images and uploads them to OCR.space using the free test key. Before installing, consider: (1) it will transmit image data to a third-party server — don't send sensitive images unless you accept that. (2) You need Python packages 'requests' and 'Pillow' installed; SKILL.md doesn't list them, so install them (pip install requests pillow) or run the script in a controlled environment. (3) If you plan to use a paid API key, remove the hardcoded 'helloworld' and provide your key securely (avoid committing it into the file). (4) Test the script locally to confirm behavior and network calls before allowing any agent to invoke it autonomously.

Like a lobster shell, security has layers — review code before you run it.

OCRvk97bwp81v43f0en8z3jr7mdp9582mpwqchinesevk97bwp81v43f0en8z3jr7mdp9582mpwqfreevk97bwp81v43f0en8z3jr7mdp9582mpwqlatestvk97bwp81v43f0en8z3jr7mdp9582mpwqlatest,ocrvk97bwp81v43f0en8z3jr7mdp9582mpwq

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

OCR.space 文字识别 Skill

使用免费 OCR API 识别图片中的文字,支持多语言。

🚀 功能

  • ✅ 图片文字识别 (OCR)
  • ✅ 多语言支持
  • ✅ 免费无需注册
  • ✅ 支持中文、英文、日文、韩文等 20+ 语言

📡 OCR.space 免费版限制

限制项额度
每日请求数500 次/天
单文件大小5 MB(自动压缩)
API Key不需要(测试用 helloworld

⚠️ 注意:免费版适合测试和小规模使用,生产环境建议购买付费版


🌍 支持的语言

语言代码语言名称
chs中文简体
cht中文繁体
eng英语
jpn日语
kor韩语
fre法语
ger德语
spa西班牙语
por葡萄牙语
rus俄语
ara阿拉伯语
tha泰语
hin印地语
vie越南语
ita意大利语
dut荷兰语
pol波兰语
tur土耳其语

💡 Engine 2 和 Engine 3 支持语言自动检测


📁 文件结构

ocr-space/
├── SKILL.md          # 本文件
├── ocr_space.py      # 主脚本
└── README.md         # 使用说明

🔧 使用方法

命令行

# 识别中文(默认)
python3 ocr_space.py /path/to/image.jpg

# 识别英文
python3 ocr_space.py /path/to/image.jpg eng

# 识别日文
python3 ocr_space.py /path/to/image.png jpn

Python 代码调用

import sys
sys.path.insert(0, '/Users/shusiwei/.openclaw/workspace/skills/ocr-space')
from ocr_space import ocr_image

# 识别图片
result = ocr_image('/path/to/image.jpg', language='chs')
if result:
    print(result)

📝 OpenClaw 中使用

在 OpenClaw 中可以通过 exec 调用:

python3 ~/.openclaw/workspace/skills/ocr-space/ocr_space.py <图片路径> [语言]

示例:

# 识别桌面图片
python3 ~/.openclaw/workspace/skills/ocr-space/ocr_space.py ~/Desktop/screenshot.png

🔍 完整 API 文档

更多参数和使用方法请参考:OCR.space OCR API


📜 更新日志

  • 2026-03-10: 初始版本,支持基本 OCR 功能

Files

2 total
Select a file
Select a file to preview.

Comments

Loading comments…