OCR Space: Free OCR API
v1.0.0调用 OCR.space 免费 API 识别图片中的文字
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & 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.
OCRchinesefreelatestlatest,ocr
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 totalSelect a file
Select a file to preview.
Comments
Loading comments…
