Choose a workflow
Which endpoint fits which job, and how to combine steps in one request.
Single-purpose endpoints
Use these when you need exactly one thing. They take one field and need no JSON.
| You want | Endpoint |
|---|---|
| A PDF from Word, Excel, PowerPoint, an image or EPUB | /v1/convert/pdf |
| A searchable PDF from a scan | /v1/ocr |
| Several files joined, in order | /v1/merge |
| The text of a document as Markdown, for search or an LLM | /v1/extract/markdown |
| An Excel file with cells changed and recalculated | /v1/xlsx/edit |
| A Word file with text replaced | /v1/docx/edit |
| One PDF cut into several, by size or by ranges | /v1/split |
| The signatures in a PDF checked | /v1/verify |
Build: everything else
/v1/build does what the others do and more, in one request: it joins
parts (files, page ranges, HTML pages), applies actions in order (OCR, redact, watermark,
rotate, fill forms, PDF/A, encrypt, sign…) and writes one output (PDF, PNG, Markdown, HTML,
JSON, Word, Excel, or a ZIP of split PDFs).
One request instead of several means one upload, one download, and no intermediate file on your side. Each part and action costs its units, as if you had made the calls one by one.
Common pipelines
| Job | Parts | Actions | Output |
|---|---|---|---|
| Make scanned archives searchable and safe to share | the scan | ocr, redact (patterns) | pdf |
| Send a contract packet | contract, annex | redact, watermark, encrypt | pdf, linearised |
| File invoices for the long term | the invoice | pdfa | pdf |
| Publish an accessible report | the report | pdfua | pdf |
| Feed documents to search or an LLM | the document | ocr if scanned | markdown or json |
| Close a submitted form | the form | fill_form, flatten_forms | pdf |
| Sign an approved contract | the contract and your .p12 | sign | pdf |
| Issue one payslip per employee | the batch | redact (patterns) | split, every page |
| Show a preview | the document | none | png |
curl https://api.nexpdf.dev/v1/build \
-H "Authorization: Bearer $NEXPDF_API_KEY" \
-F contract=@contract.pdf \
-F annex=@annex.docx \
-F 'instructions={
"parts": [
{
"file": "contract"
},
{
"file": "annex"
}
],
"actions": [
{
"type": "redact",
"query": "email",
"mode": "pattern"
},
{
"type": "watermark",
"text": "CONFIDENTIAL"
},
{
"type": "encrypt",
"owner_password": "owner-secret",
"user_password": "reader"
}
],
"output": {
"type": "pdf",
"linearize": true
}
}' \
-o packet.pdfCloud, SDK or MCP?
| Cloud API | SDK | MCP server | |
|---|---|---|---|
| Runs | On our servers | In your app or on your servers | Next to an AI assistant, calling the Cloud API |
| Install | Nothing (a small client, optional) | A native library | One command |
| Cost | Units per operation | A licence, no per-request cost | Units per operation |
| Files leave your network | Yes, for the length of the request | No | Yes, for the length of the request |
| Best for | Serverless, occasional jobs, any language | High volume, offline, mobile, private data | Asking an assistant in plain words |