跳转到内容
概览 概览 资讯 资讯
分享

Cookbook

可复制的提示。 现成的 API 示例。

用于 Document AI、Data APIs 和 IDE 工作流的 28 个提示 — 复制、粘贴、获取代码。

PaperOffice llms.txt 被任何现代 LLM 读取:Claude、Cursor 以及您的 IDE 完成其余部分。

28 个现成的提示 真实端点 REST 和 MCP

集成

从 llms.txt 到持续集成

三个步骤:链接文档、说明意图、获取代码。

  1. 插入 llms.txt

    粘贴到 Claude、Cursor 或您的 IDE 中。

  2. 表达意图

    要构建的内容——或从此页面获取提示词。

  3. 生成代码

    IDE提供实时集成。

Document AI

读取、检查、发送文档

复制提示词,粘贴到Claude或Cursor中——完成。

IDP发票 + AI-OCR + 边界框

提取发票字段,包括文档中的位置。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build me an invoice extractor that:
1. Uploads a PDF via POST /job/add/workflow (multipart, field file_1)
2. Uses idp_collection=invoice, processing_lane=instant (sync)
3. Reads every field from result.pages_idp[0].suggested_fields
   (keys like _supplier_name, _total_amount, _invoice_date)
   and the boxes from result.pages_aiocr.pages
4. Renders a verification view highlighting each value
   at its bounding box position

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

AI-OCR — 从图像/PDF中提取文本

通过 POST /job/add/paperoffice_aiocr___generate (ocr_mode=complete) 获取全文。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Write a minimal script that:
1. Sends an image or PDF to POST /job/add/paperoffice_aiocr___generate
   (multipart, field file_1)
2. Uses ocr_mode=complete and processing_lane=instant (sync)
3. Prints the extracted text from result ?? job_result (pages)

Modes: complete (+tables), grid (+bounding boxes), text (plain).
Auth: Authorization: Bearer po_ut_YOUR_API_KEY

AI PDF 拆分 — 分离合并的 PDF

识别文档边界并命名单个文件。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a splitter for large batch PDFs (up to 3000 pages):
1. POST /job/add/workflow with template=pdf_ai_split (multipart, field file)
2. naming_instruction=Dokumenttyp_Datum_Absender,
   locale=de_DE, processing_lane=instant
3. List every created document from the result
   (suggested filename + page range)

The AI detects document boundaries automatically.
Auth: Authorization: Bearer po_ut_YOUR_API_KEY

文档匿名化 — 遮蔽个人身份信息 (PII)

识别并编辑姓名、IBAN 账号和地址。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt
Also use llms-full.txt for anonymize parameters (scenario, apply).

Build a GDPR anonymizer (preview → apply):
1. POST /job/add/workflow template=document_anonymize_preview (field file)
2. Set scenario=gdpr_auskunft (or externe_weitergabe / finanzdaten),
   redact_categories=all, optional whitelist / custom_redact
3. client_wait=false then poll GET /job/get/{job_id}
4. Show detected_pii.redact_box_ids + simplified_boxes
5. Apply: POST /job/add/paperoffice_dataripper___redact_image
   with files + bounding_boxes + redact_boxes from the preview
   (or MCP: po_anonymization_pii_detect → po_anonymization_redaction_apply
   with preview_job_id)
Optional one-shot: REST template=document_anonymize OR MCP po_anonymization_anonymize
  (no HITL; pass scenario/whitelist).
Redact Agent: POST /documents/redact-agent-run or MCP po_documents_redact_agent_run.

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

语音 TTS — 文本转音频

通过 voice=Nadja(及其他)获取同步 MP3。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a text-to-speech generator:
1. POST /job/add/paperoffice_voice___tts with text=..., voice=Nadja,
   output_format=mp3
2. output=url and processing_lane=instant for a synchronous audio link
3. Play or download the audio URL from result ?? job_result

Voices: Nadja, Thomas, Anna, Hans (DE) + 100+ more.
Auth: Authorization: Bearer po_ut_YOUR_API_KEY

IDP 合同 + AI-OCR + 边界框

提取合同字段,包括其在文档中的位置。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a contract extractor that:
1. Uploads a PDF via POST /job/add/workflow (multipart, field file_1)
2. Uses idp_collection=contract, processing_lane=instant (sync)
3. Reads parties, dates and notice period from
   result.pages_idp[0].suggested_fields (value + bounding box)
4. Renders a verification view with bounding boxes

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

电子签名 — 创建签名请求

邀请签署人并控制状态/提醒。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build an e-signature request flow:
1. Ensure the document has a pofid in PaperOffice
2. POST /signatures/create with document_pofid (or pofid)
   and a signers array (name + email per signer)
3. Return the signature request id and status
4. Optionally POST /signatures/remind for pending signers

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

数字挂号信 — 通过电子邮件发送

通过PDF密码(电子邮件或短信)和发送记录确保安全投递。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a secure document delivery (digital registered mail):
1. POST /document_delivery/create_and_send with:
   pofids: ["POFID_HERE"],
   recipient_email, optional recipient_name,
   subject, optional message
2. security_mode=link → PDF password in the same email
   security_mode=secure_sms → link by email, password by SMS
   (requires recipient_phone in E.164, e.g. +49170…)
3. Show delivery_id and that access events are logged
   (Versandhistorie / delivery log)

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

数据与安全 APIs

检查位置、风险和主数据

地理编码、天气、指纹、增值税识别号等 — 作为提示。

地理编码 — 正向/反向/自动补全

地址 ↔ 坐标。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a geocoding helper that:
1. Forward: GET /geocoding/forward?q=...&lang=de
2. Reverse: GET /geocoding/reverse?lat=...&lon=...
3. Autocomplete: GET /geocoding/autocomplete?q=...
4. Prints display_name, lat, lon and credits_billed

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

天气 — 当前+空气质量

当前天气,包括计费信息。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a weather lookup that:
1. Calls GET /weather/current?lat=...&lon=...&lang=de
2. Shows temperature, condition text and air quality if present
3. Displays credits_billed from the response

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

IP2Location — IP → 位置

来自 IP 的位置,可选天气。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build an IP intelligence client that:
1. Calls GET /ip2location/full (empty ip = visitor IP)
2. Extracts country, city, geo_lat/lon, ISP
3. Optionally chains weather from the same response

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

设备指纹 — 访客 ID

访客 ID 和置信度。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a device fingerprint check that:
1. Collects client signals in the browser
2. POSTs to /fingerprint/identify
3. Returns visitor_id / confidence for fraud checks

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

虚假邮件检测器 — 一次性邮箱检查

一次性邮箱和风险评分。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build an email risk checker that:
1. Validates an address via the Fake Email Detector endpoint
2. Flags disposable / role / invalid domains
3. Returns a clear allow/deny recommendation

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

VPN / 匿名性检查

VPN、代理、Tor、数据中心。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a VPN/proxy detector that:
1. Calls GET /ip2location/vpn?ip=...
2. Normalizes is_vpn, is_proxy, is_tor, is_datacenter flags
3. Shows a clear risk badge for the visitor

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

VAT-Validierer — EU-USt-IdNr.

有效性和公司信息。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a VAT ID validator that:
1. Checks an EU VAT number via the VAT validator endpoint
2. Returns company name and address when valid
3. Handles invalid / not-found responses cleanly

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

货币兑换 — 实时汇率

使用当前汇率进行换算。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a currency converter that:
1. Calls the currency exchange endpoint (from, to, amount)
2. Shows rate and converted amount
3. Caches the last rate for the UI

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

IDE & AI 工具

适用于 Claude、Cursor 及您的 IDE

可在 IDE 中使用的提示词 — 包含 MCP 服务器。

IDP 发票流水线 + 边界框 + CSV

带验证坐标的批量提取。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Create a Python script that:
1. Takes a folder of invoice PDFs
2. Extracts all fields using POST /job/add/workflow with idp_collection=invoice
3. Returns bounding boxes for verification (result.pages_aiocr)
4. Exports to CSV

Important: Use file_1 for uploads; fields live in result.pages_idp[0].suggested_fields.
Handle sync (HTTP 200 with result) and async (HTTP 202 → poll GET /job/get/{job_id}).
Auth: Authorization: Bearer po_ut_YOUR_API_KEY

MCP 服务器 — IDE 中的文档 AI

连接 MCP 并处理工作区中的文档。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Help me set up the MCP Server for PaperOffice in Cursor.
I want to use Document AI directly in my IDE.

Show me:
1. How to configure the MCP connection (URL https://mcp.paperoffice.ai/cursor)
2. Available tools via tools/list
3. How to process documents from my workspace

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

语音代理 — STT + TTS

处理语音输入并生成音频回复。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Create a voice agent that:
1. Takes audio input (Speech-to-Text)
2. Processes the text
3. Generates audio response (Text-to-Speech)

Use these pipelines:
- STT: POST /job/add/paperoffice_voice___stt (audio_file)
- TTS: POST /job/add/paperoffice_voice___tts (text, voice=Nadja,
  output_format=mp3, output=url)
- Use processing_lane=instant for a synchronous response.
Auth: Authorization: Bearer po_ut_YOUR_API_KEY

欺诈检测 — 指纹 + IP

检查设备指纹和地理/IP信号。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a fraud detection system that:
1. Checks device fingerprints
2. Validates IP geolocation
3. Detects suspicious patterns

Use the Security & Data AI endpoints.
These are instant APIs (no polling needed).
Auth: Authorization: Bearer po_ut_YOUR_API_KEY

批量AI PDF拆分

异步拆分大型PDF文件夹。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Create a batch processor that:
1. Takes a folder of large PDFs (up to 3000 pages each)
2. Uses POST /job/add/workflow with template=pdf_ai_split
3. Uses naming_instruction for smart filenames
4. Handles async jobs (HTTP 202) by polling GET /job/get/{job_id}

Use locale=de_DE for German document types.
Auth: Authorization: Bearer po_ut_YOUR_API_KEY

文档分类器 — OCR + 文件夹

OCR,分类,按子文件夹排序。

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a document classifier that:
1. Watches a folder for new PDFs
2. Uses OCR (POST /job/add/paperoffice_aiocr___generate, ocr_mode=complete)
   to extract text
3. Classifies into: invoice, contract, receipt, correspondence
4. Moves files to category subfolders
5. Logs results to classification_log.csv

Authenticate with: Authorization: Bearer po_ut_YOUR_API_KEY.
processing_lane=instant for a synchronous response.

端到端

完整管道

从入口到出口——每个步骤都在同一个提示中。

IDP 发票 → 会计导出

PDF上传 → AI-IDP + 边界框 → 验证 → CSV导出

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build an accounts-payable pipeline:
1. Watch a folder for incoming invoice PDFs
2. Extract fields via POST /job/add/workflow (file_1,
   idp_collection=invoice, processing_lane=instant)
3. Flag every field with confidence < 0.9 for manual review,
   including its bounding box for the verification UI
   (result.pages_idp[0].suggested_fields + result.pages_aiocr)
4. Export supplier, total, date and IBAN as CSV for the accounting import

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

IDP 合同 + 期限警报

合同上传 → 关键术语 → Knowledge Graph → 警告消息

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a contract analyzer:
1. Upload contracts via POST /job/add/workflow (file_1,
   idp_collection=contract, processing_lane=instant)
2. Extract parties, start date, end date and notice period
   from result.pages_idp[0].suggested_fields (each with a bounding box)
3. Store the key terms in a knowledge graph
4. Alert me 90 days before a notice period expires

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

PDF 转换器 — Word / PowerPoint / PDF/A

PDF上传 → 选择格式 → 转换 → 下载

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a PDF converter service:
1. One pipeline per target format (field file_1):
   POST /job/add/pdfstudio___pdf_to_word | pdfstudio___pdf_to_powerpoint |
   pdfstudio___pdf_to_pdfa | pdfstudio___pdf_to_webp
2. processing_lane=instant for a synchronous response
3. Return the download URL from result ?? job_result

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

Webhooks — 处理 job.completed

注册Webhook → 发送文档 → 收到事件 → 处理

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a webhook event handler:
1. Register a webhook via POST /webhooks/subscribe
   (url, events: ["job.completed", "job.failed"], secret)
2. Verify the HMAC-SHA256 signature of every delivery
   with the subscription secret (see llms-full.txt, webhooks)
3. Process the payload whenever job.completed arrives

Note: webhooks always require a token (account binding).
Auth: Authorization: Bearer po_ut_YOUR_API_KEY

OCR → TTS — 文档转音频

文档OCR → 文本处理 → 生成TTS → 保存音频

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a document-to-audio pipeline:
1. OCR via POST /job/add/paperoffice_aiocr___generate
   (file_1, ocr_mode=complete, processing_lane=instant)
2. Split the extracted text (result ?? job_result, pages) into 5000-character chunks
3. TTS per chunk: POST /job/add/paperoffice_voice___tts (text, voice=Nadja,
   output_format=mp3, output=url, processing_lane=instant)
4. Save all returned audio URLs as a playlist

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

批量OCR → CSV导出

扫描文件夹 → 批量OCR → 收集文本 → CSV导出

提示词
Read this llms.txt (AI-optimized API docs):
https://api.paperoffice.ai/latest/docs/llms.txt

Build a batch OCR-to-CSV exporter:
1. Scan a folder for PDF/PNG/JPG/TIFF/WEBP files
2. For each file: POST /job/add/paperoffice_aiocr___generate
   (file_1, ocr_mode=complete, processing_lane=instant)
3. Collect filename, page_count, text preview and confidence
4. Write everything to ocr_results.csv

Auth: Authorization: Bearer po_ut_YOUR_API_KEY

下一步

继续处理 API

llms.txt 和 Playground — 无需绕路。

用于 REST 和 MCP 的令牌 响应 credits_billed 自有欧盟基础设施
视频

Cookbook 在行动

观看 PaperOffice API 的实际操作演示视频。

Cookbook 在行动

常见问题

关键信息一览

我需要 SDK 吗?

不需要。PaperOffice API 采用纯 REST API:一个端点、一个 Bearer Token、multipart/form-data 格式。此外,还为 IDE 和 Agent 提供了 MCP Server。

为什么每个提示中都有 llms.txt?

llms.txt 是 API 文档的机器可读版本。您的模型从中读取端点、参数和响应格式,而不会编造任何字段。

我应该输入哪个密钥?

输入带有前缀 po_ut_ 的用户令牌。您可以在 PaperOffice App 的 Account → API 中找到它。将提示中的 po_ut_YOUR_API_KEY 替换为您自己的密钥。

结果是立即返回还是需要轮询?

使用 processing_lane=instant,API 会同步响应(HTTP 200 附带 result)。如果不使用该参数,则会返回 HTTP 202 及 job_id;您可以通过 GET /job/get/{job_id} 或 Webhook 获取结果。

这些提示在任何环境中都能工作吗?

这些提示不包含特定于工具的指令。已在 Claude、Claude Code 和 Cursor 中经过测试——任何能够读取 URL 的环境都能处理它们。

调用一次的费用是多少?

每次响应都会注明 credits_billed(扣减的 Credits)。各管道的 Credit 价格请参阅价格概览;仅对实际处理的内容进行计费。

您希望在哪里试用 PaperOffice?

电脑和智能手机已连接:在电脑上使用 Workspace,在手机上捕获文档。

您的试用版已准备就绪

您想从哪里开始?

完整的 Workspace 针对电脑进行了优化。移动版本适用于捕获、审核和共享文档。

app.paperoffice.ai

在电脑上开始使用

我们将您的个人访问链接发送到您的电子邮件地址。

免费注册 打开应用 PaperOffice 应用 完整产品:网页、桌面与移动端。采集、整理、搜索文档,并与团队协同处理。 需要免费账户 打开 Playground Playground 立即试用选定功能 — 无需注册,使用受限的演示 API 密钥。 无需注册,但使用受限的演示 API 密钥