Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

document-extraction-api

БесплатноЗапускает вложенные скриптыНе проверен

Use the Nutrient Data Extraction API to parse whole documents into Markdown or spatial elements, extract named fields such as invoice totals with source…

PSPDFKit-labsот PSPDFKit-labs★ 18 звёзд на GitHub

Об этом скилле

Nutrient Data Extraction

Use this skill to build with the Data Extraction API. To process a file in chat, connect the hosted Nutrient MCP plugin for its supported document tasks.

Choose the operation

Desired result Use
Named fields, such as invoice number, total, and line items, with evidence extract with a JSON Schema via scripts/extract.py.
Whole-document Markdown for RAG, search, or migration parse with Markdown output via scripts/parse.py.
Document layout, bounding boxes, or every detected table parse with spatial output via scripts/parse.py.
The likely document type, such as invoice, receipt, or contract classify via the Classify API.
Where the component documents start and end in a merged file split via the Split API.

For RAG chunking of a parsed document, see the sibling grounded-rag-ingestion skill. For PDF generation, conversion, OCR, redaction, signing, or any /build-based workflow, use the sibling document-processor-api skill.

Classify or separate a packet

Follow the linked API examples for these operations. The bundled scripts cover parsing and field extraction.

  • Use POST /extraction/classify with at least two meaningful labels for a direct classification request. The result ranks labels with scores. Route ambiguous results to review.
  • Use POST /extraction/split when the workspace has Split enabled. Read the one-based, inclusive page ranges and boundary confidence from output.segments. When you need one PDF per segment, the API can also return a ZIP download.
  • For a mixed packet, review uncertain boundaries and classify the separated documents. Then extract against the right schema for each type. Keep each segment's original page range with the result so a citation can be traced back to the packet.
  • When the user provides the page ranges and only wants pages cut out, use the document-processor-api skill instead.

/extraction/extract — schema field extraction with citations

Define the fields you want in a JSON Schema (root type: object); extract returns output.data with those values and output.metadata with per-field citation metadata (options.includeCitations defaults on). Accepts a local file or a URL.

For a first run, save the schema from the Extract API examples as fields.json and use the synthetic sample invoice. Look for invoice number INV-DEMO-1042 and total 176.00 USD with citations on page 1.

# Pull schema-defined fields from a local invoice, with citations (default)
uv run scripts/extract.py --input invoice.pdf --schema fields.json --out result.json

# From the public sample URL
uv run scripts/extract.py --url https://www.nutrient.io/downloads/pdf-to-json-review/invoice.pdf \
  --schema fields.json --out result.json --mode understand

Use the Data Extraction pricing guide and the response's usage for current charges. The bundled script gates high local estimates behind --yes and can display legacy credit-based estimates. See references/extract-output-and-citations.md for the response shape. Include the source page when reporting cited values, and flag missing or uncertain evidence for review.

Setup

  • Get an API key with Data Extraction access at https://dashboard.nutrient.io/.
  • Export it as NUTRIENT_EXTRACT_API_KEY:
    export NUTRIENT_EXTRACT_API_KEY="pdf_live_..."
    
  • Scripts live in scripts/ relative to this SKILL.md. Use the directory containing this SKILL.md as the working directory:
    cd <directory containing this SKILL.md> && uv run scripts/<script>.py --help
    

The helpers prefer NUTRIENT_EXTRACT_API_KEY and can use a global key with Data Extraction access via NUTRIENT_API_KEY when the first variable is unset.

/extraction/parse — one primitive, two output shapes

One call returns a structural document model with typed elements, bounding boxes, confidence scores, and reading order, or a whole-document Markdown string. The processing mode determines which element types are available.

Picking a mode

The processing modes guide recommends auto as a starting point for direct API integrations. It routes each page to structure, understand, or agentic. The bundled parse.py helper takes explicit modes and defaults to structure with spatial output.

User intent Mode Output
Read an existing PDF text layer for search or RAG text Markdown
Read a scan or phot
Полный SKILL.md на GitHub

Установить document-extraction-api в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.gitignorereferences/extract-output-and-citations.mdreferences/parse-output-filtering.mdscripts/extract.pyscripts/lib/common.pyscripts/lib/test_common.pyscripts/parse.pyscripts/test_extract.py

FAQ

Что делает скилл document-extraction-api?

Use the Nutrient Data Extraction API to parse whole documents into Markdown or spatial elements, extract named fields such as invoice totals with source citations, classify documents against labels, or detect document boundaries in a merged packet.

Как установить скилл document-extraction-api?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл document-extraction-api запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить document-extraction-api с