调用 Nutrient DWS API 处理文档转换、OCR提取、脱敏签署与表单填写
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "nutrient-document-processing" 技能: 1. 下载 https://raw.githubusercontent.com/affaan-m/ECC/main/skills/nutrient-document-processing/SKILL.md 2. 保存为 ~/.claude/skills/nutrient-document-processing/SKILL.md 3. 装好后重载技能,告诉我可以用了
请使用 Nutrient DWS API 对这个发票文件夹执行 OCR,提取每份发票的编号、日期、供应商名称、税额和总金额,并输出为结构化 JSON。
返回每份发票的结构化字段数据,可用于报销或入账。
请用 Nutrient DWS API 扫描这份 DOCX 合同,识别并遮盖身份证号、手机号、邮箱和银行账户信息,然后导出为脱敏后的 PDF。
生成可安全共享的脱敏 PDF 合同版本。
请使用 Nutrient DWS API 将客户资料填入这份 PDF 表单的姓名、地址、公司和日期字段,并在签名位置添加电子签名,输出最终文件。
返回已填写并签署完成的最终 PDF 文档。
Note: This skill integrates with the Nutrient commercial API. Review their terms before use.
Process documents with the Nutrient DWS Processor API. Convert formats, extract text and tables, OCR scanned documents, redact PII, add watermarks, digitally sign, and fill PDF forms.
Get a free API key at nutrient.io
export NUTRIENT_API_KEY="pdf_live_..."
All requests go to https://api.nutrient.io/build as multipart POST with an instructions JSON field.
# DOCX to PDF
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "[email protected]" \
-F 'instructions={"parts":[{"file":"document.docx"}]}' \
-o output.pdf
# PDF to DOCX
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "[email protected]" \
-F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"docx"}}' \
-o output.docx
# HTML to PDF
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "[email protected]" \
-F 'instructions={"parts":[{"html":"index.html"}]}' \
-o output.pdf
Supported inputs: PDF, DOCX, XLSX, PPTX, DOC, XLS, PPT, PPS, PPSX, ODT, RTF, HTML, JPG, PNG, TIFF, HEIC, GIF, WebP, SVG, TGA, EPS.
# Extract plain text
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "[email protected]" \
-F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"text"}}' \
-o output.txt
# Extract tables as Excel
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "[email protected]" \
-F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"xlsx"}}' \
-o tables.xlsx
# OCR to searchable PDF (supports 100+ languages)
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "[email protected]" \
-F 'instructions={"parts":[{"file":"scanned.pdf"}],"actions":[{"type":"ocr","language":"english"}]}' \
-o searchable.pdf
Languages: Supports 100+ languages via ISO 639-2 codes (e.g., eng, deu, fra, spa, jpn, kor, chi_sim, chi_tra, ara, hin, rus). Full language names like english or german also work. See the complete OCR language table for all supported codes.
# Pattern-based (SSN, email)
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "[email protected]" \
-F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"redaction","strategy":"preset","strategyOptions":{"preset":"social-security-number"}},{"type":"redaction","strategy":"preset","strategyOptions":{"preset":"email-address"}}]}' \
-o redacted.pdf
# Regex-based
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "[email protected]" \
-F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"redaction","strategy":"regex","strategyOptions":{"regex":"\\b[A-Z]{2}\\d{6}\\b"}}]}' \
-o redacted.pdf
Presets: social-security-number, email-address, credit-card-number, international-phone-number, north-american-phone-number, date, time, url, ipv4, ipv6, mac-address, us-zip-code, vin.
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "[email protected]" \
…
帮助用户在回答前选择简短、标准或详细版本,控制回复深度与 token 用量。
处理PDF文档的读取提取、合并拆分、表单填写与OCR识别等任务