银行卡识别 - Bank Card Recognition OCR

使用极速数据银行卡识别 API,对银行卡图片进行 OCR 识别,返回卡号、卡类型、银行名称等信息。

MIT-0 · Free to use, modify, and redistribute. No attribution required.
2 · 32 · 0 current installs · 0 all-time installs
by极速数据@jisuapi
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the implementation: the script converts a local image or provided base64 to base64 and POSTs it to Jisu's bankcardcognition endpoint using an app key (JISU_API_KEY). Required binary (python3) and primary env var align with the stated purpose.
Instruction Scope
Instructions are narrowly scoped to reading a user-specified image file or base64 payload and calling the remote API. This legitimately requires reading local image files (sensitive data). The SKILL.md warns about privacy, which is appropriate. Nothing in the instructions asks for unrelated files, credentials, or system state.
Install Mechanism
This is instruction-only (no install spec) which minimizes install risk. One small mismatch: the script imports the Python 'requests' library but SKILL.md/metadata does not declare installing that dependency; the environment must have 'requests' available for runtime.
Credentials
Only JISU_API_KEY is required and used as the API key for the Jisu service — proportional and expected. No other secrets, tokens, or unrelated environment variables are requested.
Persistence & Privilege
The skill is not always-enabled and does not request elevated agent privileges or modify other skills. It runs as an ad-hoc script when invoked.
Assessment
This skill appears to do exactly what it says: it sends a provided image (or its base64) to Jisu's bank-card OCR API and returns the parsed result. Before installing or using it: 1) Be aware you're sending sensitive card images and derived card numbers to a third-party service (Jisu). Do not use real card data unless you understand and accept their privacy/retention policy. 2) Keep your JISU_API_KEY secret; it grants access to the external service. 3) Ensure the runtime has the Python 'requests' package installed (the script imports requests but the skill does not declare installing it). 4) Because the skill's source/homepage are 'unknown', consider running the included script in an isolated environment, review the short source (it is ~80 lines) yourself, and test with non-sensitive images first. 5) If you need stricter privacy, consider doing OCR locally with a local model/tool rather than sending card images to an external API.

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

Current versionv1.0.1
Download zip
latestvk977bg37q0f543akb2m41gytgs831vtr

License

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

Runtime requirements

💳 Clawdis
Binspython3
EnvJISU_API_KEY
Primary envJISU_API_KEY

SKILL.md

极速数据银行卡识别(Jisu BankCardCognition)

基于 银行卡识别 API 的 OpenClaw 技能,可对银行卡照片进行 OCR 识别,返回:

  • number:银行卡号
  • type:银行卡类型(借记卡/信用卡等)
  • bankname:银行名称
  • bankno:银行编号

使用前需要在极速数据官网申请服务,文档见:https://www.jisuapi.com/api/bankcardcognition/

环境变量配置

# Linux / macOS
export JISU_API_KEY="your_appkey_here"

# Windows PowerShell
$env:JISU_API_KEY="your_appkey_here"

脚本路径

脚本文件:skills/bankcardcognition/bankcardcognition.py

使用方式与请求参数

当前脚本封装了 /bankcardcognition/recognize 接口,统一通过一段 JSON 调用。

1. 从本地图片识别银行卡(推荐)

python3 skills/bankcardcognition/bankcardcognition.py '{"path":"bankcard.jpg"}'
  • path:本地银行卡图片路径(脚本会读取并转为 base64),建议使用较清晰的 JPG/PNG,大小不超过 500K。

2. 直接传 base64 图片内容

如果前置流程已经将图片转为 base64,可以直接传 pic 字段:

python3 skills/bankcardcognition/bankcardcognition.py '{
  "pic": "<base64_string>"
}'

注意:pic 只需要纯 base64 内容,不要带 data:image/...;base64, 前缀。

3. 请求参数说明

字段名类型必填说明
pathstring二选一本地图片路径,脚本会自动读取并转为 base64
imagestring二选一path 的别名
filestring二选一path 的别名
picstring二选一已是 base64 的图片内容(不带前缀)

path/image/filepic 至少提供一个,同时存在时优先使用 pic

返回结果说明

原始接口返回结构示例(参考官网文档):

{
  "status": 0,
  "msg": "ok",
  "result": {
    "number": "9559980210010631815",
    "type": "借记卡",
    "bankname": "农业银行",
    "bankno": "01030000"
  }
}

本技能会直接输出 result 对象,例如:

{
  "number": "9559980210010631815",
  "type": "借记卡",
  "bankname": "农业银行",
  "bankno": "01030000"
}

当出现业务错误(如图片为空、格式错误、大小超限等)时,统一包装为:

{
  "error": "api_error",
  "code": 201,
  "message": "图片为空"
}

网络或解析错误则返回:

{
  "error": "request_failed" | "http_error" | "invalid_json",
  "message": "...",
  "status_code": 500
}

常见错误码

来源于 银行卡识别文档

代号说明
201图片为空
202图片格式错误
204图片大小超过限制
208识别失败
210没有信息

系统错误码 101–108 与其它极速数据接口一致。

在 OpenClaw 中的推荐用法

  1. 用户上传一张银行卡照片,希望确认卡号、银行名称或卡类型。
  2. 代理将图片保存为本地文件或转为 base64,调用:python3 skills/bankcardcognition/bankcardcognition.py '{"path":"bankcard.jpg"}'
  3. 从返回结果中读取 number/type/bankname/bankno 字段,用自然语言总结,并根据场景提醒注意隐私和安全,仅在安全环境下展示或存储卡号信息。

Files

2 total
Select a file
Select a file to preview.

Comments

Loading comments…