Install
openclaw skills install @sycamore792/easydoc-maskUse when tasks need EasyLink masking API to redact sensitive fields from medical records (EMR) or other documents. Trigger for requests about POST /v1/easydoc/mask and GET /v1/easydoc/mask/{task_id}, selecting mode (emr-mask), customizing masked fields via json_schema, downloading masked output files, and handling async polling until SUCCESS or FAILED.
openclaw skills install @sycamore792/easydoc-maskUse this skill to call the EasyLink async masking API and return masked document download URLs. Always follow the same lifecycle: validate inputs, submit task, poll result, present output URLs.
If user has no API key, guide first:
https://platform.easylink-ai.comEASYLINK_API_KEYSingle platform only (CN/EasyLink):
https://api.easylink-ai.comPOST /v1/easydoc/maskGET /v1/easydoc/mask/{task_id}filesemr-maskValidate request inputs
api-key from user input or EASYLINK_API_KEY env var.<= 100MB).Submit async mask task
multipart/form-data with files, mode=emr-mask, and optional json_schema.task_id from response.Poll task status
/v1/easydoc/mask/{task_id} until terminal status.SUCCESS, ERROR, FAILED, COMPLETED, DONEPENDING, PROCESSING, RUNNING, IN_PROGRESS, QUEUEDNormalize output
raw.task_id, status, results.url (download link for masked file) and masked_fields.Handle failures predictably
task_id in error reports when available.By default, emr-mask redacts the following fields:
住址、姓名、生日、病例ID、账户ID、医保号、商品名、样本号、病床号、病案号、登记号、医生姓名、家属信息、检查单号、联系方式、身份证号、发票二维码、发票个人信息、患者账号余额、检查单二维码、检查单条形码
To customize which fields are masked, pass json_schema as a JSON string:
-F 'json_schema={"type": "object", "properties": {"姓名": {"type": "string"}, "身份证号": {"type": "string"}, "联系方式": {"type": "string"}}}'
If the user does not specify fields, omit json_schema and let the API use defaults.
Submit and poll:
curl -X POST "https://api.easylink-ai.com/v1/easydoc/mask" \
-H "api-key: $EASYLINK_API_KEY" \
-F "files=@record.pdf" \
-F "mode=emr-mask"
With custom fields:
curl -X POST "https://api.easylink-ai.com/v1/easydoc/mask" \
-H "api-key: $EASYLINK_API_KEY" \
-F "files=@record.pdf" \
-F "mode=emr-mask" \
-F 'json_schema={"type": "object", "properties": {"姓名": {"type": "string"}, "身份证号": {"type": "string"}}}'
Poll status:
curl -X GET "https://api.easylink-ai.com/v1/easydoc/mask/{task_id}" \
-H "api-key: $EASYLINK_API_KEY"
Bundled Python helper:
python3 scripts/easydoc_mask.py --api-key "$EASYLINK_API_KEY" \
--file ./record.pdf --save ./result.json
# Key from environment
export EASYLINK_API_KEY="your-key"
python3 scripts/easydoc_mask.py --file ./record.pdf --save ./result.json
# Custom fields
python3 scripts/easydoc_mask.py --file ./record.pdf \
--fields "姓名" "身份证号" "联系方式" --save ./result.json
# Poll existing task only
python3 scripts/easydoc_mask.py --poll-only --task-id "b_mask_xxx" --save ./result.json
references/easydoc-mask-api.md for endpoint details and error codes.scripts/easydoc_mask.py for deterministic submit and polling.normalized; use --output-format raw for raw payload.{
"task_id": "string",
"status": "SUCCESS|ERROR|PENDING|PROCESSING|FAILED|COMPLETED|DONE",
"results": [
{
"url": "string",
"masked_fields": ["string"],
"page_count": 0
}
],
"raw": {}
}