🎁 Get the FREE AI Skills Starter Guide — Subscribe →
BytesAgainBytesAgain
🦀 ClawHub

OCR Space: Free OCR API

by @juguangyuan520-dotcom

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

Versionv1.0.0
Downloads2,940
Stars⭐ 3
TERMINAL
clawhub install ocr-space

📖 About This Skill


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

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 功能