بنقرة واحدة
nutrient-document-processing
使用 Nutrient DWS API 处理、转换、OCR、提取、编辑、签名和填写文档。支持 PDF、DOCX、XLSX、PPTX、HTML 和图像。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
使用 Nutrient DWS API 处理、转换、OCR、提取、编辑、签名和填写文档。支持 PDF、DOCX、XLSX、PPTX、HTML 和图像。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
REST API 设计模式,包括资源命名、状态码、分页、过滤、错误响应、版本控制和生产 API 的速率限制。
后端架构模式、API 设计、数据库优化和 Node.js、Express、Next.js API 路由的服务器端最佳实践。
通用编码标准、最佳实践和模式,适用于 TypeScript、JavaScript、React 和 Node.js 开发。
Everything Claude Code 的交互式安装向导——引导用户选择和安装技能和规则到用户级或项目级目录,验证路径,并可选地优化已安装的文件。
自动从 Claude Code 会话中提取可复用模式,并保存为学习技能供将来使用。
基于 instinct 的学习系统,通过 hooks 观察会话,创建带置信度评分的原子级 instincts,并将它们进化为技能/命令/代理。
| name | nutrient-document-processing |
| description | 使用 Nutrient DWS API 处理、转换、OCR、提取、编辑、签名和填写文档。支持 PDF、DOCX、XLSX、PPTX、HTML 和图像。 |
使用 Nutrient DWS Processor API 处理文档。转换格式、提取文本和表格、OCR 扫描文档、脱敏 PII、添加水印、数字签名和填写 PDF 表单。
在 nutrient.io 获取免费 API Key
export NUTRIENT_API_KEY="pdf_live_..."
所有请求都发送到 https://api.nutrient.io/build,作为 multipart POST,带有 instructions JSON 字段。
什么是 multipart POST? 一种 HTTP 请求格式,可以同时发送文件和 JSON 数据。
# DOCX 转 PDF
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "document.docx=@document.docx" \
-F 'instructions={"parts":[{"file":"document.docx"}]}' \
-o output.pdf
# PDF 转 DOCX
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "document.pdf=@document.pdf" \
-F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"docx"}}' \
-o output.docx
# HTML 转 PDF
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "index.html=@index.html" \
-F 'instructions={"parts":[{"html":"index.html"}]}' \
-o output.pdf
支持的输入格式: PDF, DOCX, XLSX, PPTX, DOC, XLS, PPT, PPS, PPSX, ODT, RTF, HTML, JPG, PNG, TIFF, HEIC, GIF, WebP, SVG, TGA, EPS
常见转换:
# 提取纯文本
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "document.pdf=@document.pdf" \
-F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"text"}}' \
-o output.txt
# 提取表格为 Excel
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "document.pdf=@document.pdf" \
-F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"xlsx"}}' \
-o tables.xlsx
使用场景:
# OCR 为可搜索 PDF(支持 100+ 种语言)
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "scanned.pdf=@scanned.pdf" \
-F 'instructions={"parts":[{"file":"scanned.pdf"}],"actions":[{"type":"ocr","language":"english"}]}' \
-o searchable.pdf
语言支持: 100+ 种语言,通过 ISO 639-2 代码(例如 eng、deu、fra、spa、jpn、kor、chi_sim、chi_tra、ara、hin、rus)。完整语言名如 english 或 german 也可以。
常见语言代码:
eng / english - 英语chi_sim / chinese_simplified - 简体中文chi_tra / chinese_traditional - 繁体中文jpn / japanese - 日语kor / korean - 韩语deu / german - 德语fra / french - 法语spa / spanish - 西班牙语什么是 OCR? 光学字符识别——将图片中的文字转换为可编辑的文本。
# 基于模式(SSN、邮箱)
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "document.pdf=@document.pdf" \
-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
# 基于正则表达式
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "document.pdf=@document.pdf" \
-F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"redaction","strategy":"regex","strategyOptions":{"regex":"\\b[A-Z]{2}\\d{6}\\b"}}]}' \
-o redacted.pdf
预设类型: social-security-number(SSN)、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 "document.pdf=@document.pdf" \
-F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"watermark","text":"CONFIDENTIAL","fontSize":72,"opacity":0.3,"rotation":-45}]}' \
-o watermarked.pdf
可配置选项:
text:水印文本fontSize:字体大小opacity:透明度(0-1)rotation:旋转角度常见水印文本:
# 自签名 CMS 签名
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "document.pdf=@document.pdf" \
-F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"sign","signatureType":"cms"}]}' \
-o signed.pdf
什么是数字签名? 加密签名证明:
使用场景:
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "form.pdf=@form.pdf" \
-F 'instructions={"parts":[{"file":"form.pdf"}],"actions":[{"type":"fillForm","formFields":{"name":"Jane Smith","email":"jane@example.com","date":"2026-02-06"}}]}' \
-o filled.pdf
使用场景:
对于原生工具集成,使用 MCP 服务器:
{
"mcpServers": {
"nutrient-dws": {
"command": "npx",
"args": ["-y", "@nutrient-sdk/dws-mcp-server"],
"env": {
"NUTRIENT_DWS_API_KEY": "YOUR_API_KEY",
"SANDBOX_PATH": "/path/to/working/directory"
}
}
}
}
什么是 MCP 服务器? Model Context Protocol 服务器——让 Claude Code 直接调用 Nutrient API,无需 curl。
优势:
# 1. OCR 扫描的发票
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "invoice.jpg=@invoice.jpg" \
-F 'instructions={"parts":[{"file":"invoice.jpg"}],"actions":[{"type":"ocr","language":"english"}],"output":{"type":"pdf"}}' \
-o invoice-searchable.pdf
# 2. 提取文本用于分析
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "invoice-searchable.pdf=@invoice-searchable.pdf" \
-F 'instructions={"parts":[{"file":"invoice-searchable.pdf"}],"output":{"type":"text"}}' \
-o invoice.txt
# 3. 提取表格为 Excel
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "invoice-searchable.pdf=@invoice-searchable.pdf" \
-F 'instructions={"parts":[{"file":"invoice-searchable.pdf"}],"output":{"type":"xlsx"}}' \
-o invoice-tables.xlsx
# 1. 脱敏敏感信息
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "contract.pdf=@contract.pdf" \
-F 'instructions={"parts":[{"file":"contract.pdf"}],"actions":[{"type":"redaction","strategy":"preset","strategyOptions":{"preset":"social-security-number"}},{"type":"redaction","strategy":"preset","strategyOptions":{"preset":"email-address"}}]}' \
-o contract-redacted.pdf
# 2. 添加水印
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "contract-redacted.pdf=@contract-redacted.pdf" \
-F 'instructions={"parts":[{"file":"contract-redacted.pdf"}],"actions":[{"type":"watermark","text":"CONFIDENTIAL - DRAFT","fontSize":48,"opacity":0.2}]}' \
-o contract-final.pdf
# 从 JSON 数据批量生成表单
for name in "Alice" "Bob" "Charlie"; do
curl -X POST https://api.nutrient.io/build \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-F "form.pdf=@form.pdf" \
-F "instructions={\"parts\":[{\"file\":\"form.pdf\"}],\"actions\":[{\"type\":\"fillForm\",\"formFields\":{\"name\":\"$name\",\"date\":\"2026-02-16\"}}]}" \
-o "form-$name.pdf"
done
免费层级:
付费层级:
记住:Nutrient DWS API 是一个强大的文档处理工具——几乎所有文档操作都可以通过简单的 API 调用完成。