Developers

PDF Redaction API

The PDF redaction API takes a PDF, scan or image, finds personal data with AI and OCR (names, addresses, emails, phone numbers, IBANs, card numbers, dates) and returns a flattened PDF with that data permanently removed. Documents are processed on Microsoft Azure in the EU and Switzerland and never used to train AI. Start with one request, no key needed: GET /v1/demo returns a real redacted sample, and POST /v1/demo/redact redacts the first page of your own file.

The redaction API your AI agents can call before a document leaves your company, through the REST API, the MCP server or the hosted connector.

Async jobs
Upload one or many PDFs, poll job status, then download redacted outputs.
PII controls
Choose PII categories per job, pin always-redact and always-keep-visible terms, and keep your defaults in the dashboard.
Retention modes
Default no-retention for API workflows, with an optional “open in Studio” mode when you need review.

In short

Yes. Redact PDF AI is a hosted REST API for PDF redaction. You POST a PDF or image; the API detects PII with AI, runs OCR on scans, applies the terms you always want redacted or kept, and returns a flattened PDF where the redacted text is gone, not covered. There is no SDK to install and no separate API plan: API and MCP calls draw from the same page balance as the web app, from $0.05 per page on Starter, and the first document (up to 5 pages) is free.

PDF redaction API or SDK?

Three ways to add redaction to your own software, and what each one leaves you to build.
QuestionHosted API (Redact PDF AI)PDF SDK you embedOpen-source toolkit
Where it runsOur servers on Microsoft Azure, EU (Ireland) and SwitzerlandIn your app, browser or serversOn your own servers (Python package, Docker)
How PII is foundAI entity detection per category, plus terms you always redact or keepMostly text search, regular expressions and preset patterns; some vendors add AI detectionNLP models and recognizers you configure and tune
Scans and photosOCR built in, no extra setupDepends on the SDK and the licenceImage redaction needs an OCR engine such as Tesseract
What you get backA flattened PDF: redacted content is removed, pages are rasterizedRedactions applied inside the PDF, as you configure themDetected spans or redacted images; turning that into a PDF is up to you
What you buildOne upload call, polling and a downloadViewer integration, detection rules, review screensThe pipeline: PDF parsing, OCR, review and hosting
PricingPer page, from the same balance as the web app, from $0.05A licence, often quoted on requestFree software; you pay for servers and engineering time
Best forBackends and AI agents that need accurate PII removal without building detectionRedaction inside your own viewer, offline or on your own infrastructureText pipelines on your own infrastructure, with people to tune the models

When an SDK or open source is the better choice

  • Documents may not leave your network, or processing must run offline or on-premise. We are a hosted service only.
  • Your users redact by hand inside your own document viewer, on the web or on mobile, and you need the redaction UI as a component.
  • You mostly redact plain text or database fields rather than PDFs, and have people to tune detection models.
  • You need to keep a selectable text layer in the output. Our flattened PDF does not have one, by design.

Who offers what

  • Nutrient: redaction SDK for Web, iOS, Android, .NET and other platforms, using search, regular expressions and built-in patterns, plus a separate hosted AI redaction API priced per page.
  • Apryse: redaction SDK for client-side and server-side apps with pattern and rule-based detection; its published SDK packages start at $1,500 and do not list redaction.
  • pdfRest: hosted REST redaction by literal text, regular expression or preset (with an EU endpoint), a self-hosted container and an AWS option; public pricing.
  • GroupDocs.Redaction: on-premise library for .NET, Java, Node.js and Python that redacts by exact phrase, regular expression or AI integration.
  • Presidio: open-source (MIT) PII detection and anonymization for text and images that you run yourself; its own docs say there is no guarantee it finds all sensitive information.
  • Tonic Textual: finds sensitive values in unstructured files and redacts or replaces them, in Tonic's cloud or self-hosted, with a Python SDK and a REST API.

From each vendor's own pages, checked on 21 November 2026. Offers change, so check again before you choose.

For AI agents & LLM tools

Building an agent that needs to redact PDFs? You can verify this API works in one call — no key, no signup.
Try it right now (keyless)
# No API key needed — real redaction of a synthetic-PII sample
curl https://www.redact-pdf.ai/v1/demo
# → detected PII categories + a link to the redacted PDF
Then get a key and POST your own files — the full async flow is three calls: upload, poll, download.
Why this API is agent-ready
  • Machine-readable everything: llms.txt, Markdown docs and an OpenAPI spec.
  • Idempotent retries via X-Idempotency-Key — safe for autonomous loops.
  • ephemeral retention by default: originals are deleted after processing.
  • Output is rasterized — redacted content is unrecoverable, so agents can safely pass results downstream.
  • Official MCP server: redact-pdf-mcp on npm (source). Add it to Claude Code with claude mcp add redact-pdf -- npx -y redact-pdf-mcp, install the Claude plugin (Claude Code and Cowork), or use the REST API above directly. Documents it sends are processed in the EU and Switzerland, encrypted in transit and at rest, and never used to train AI models.
  • The MCP server ships a try_demo tool that needs no API key: give it a file and it redacts the first page for real, so an agent can show you output on your own document before you configure anything. A free account then gets the first document (up to 5 pages) redacted in full, no card.

Docs: AI assistants overview · Local MCP server · Account and demo

Connect from Claude or ChatGPT

Use Redact PDF AI as a connector: sign in with your redact-pdf.ai account once, no API key to copy.
Add the connector
  1. In Claude, open Settings, then Connectors, and add a custom connector with this URL: https://mcp.redact-pdf.ai/mcp. Any MCP client that supports remote servers with OAuth sign-in takes the same URL.
  2. Sign in with your redact-pdf.ai account when asked. The connector acts only on that account.
  3. Ask for what you need, for example: “Redact the names and account numbers from this bank statement before I send it to my landlord.”
What reaches the AI, and what does not
  • You choose the file on a private upload page (create_upload_link): it goes straight to us, never through the chat.
  • The assistant gets download links and counts back, never the file or the text that was removed.
  • In pseudonymize mode the assistant works on the document as text with tags such as [Person 1] instead of names. Everything that is not a detected entity stays in that text, health details included.
  • restore_names puts the real names back into the assistant’s text on our side and returns a link only you open; delete_job deletes a document and everything kept from it at once.
  • Want nothing about the document to reach the AI? Use the local server instead (npx -y redact-pdf-mcp): it reads the file from your disk and puts the names back on your machine.

Docs: Claude connector · Pseudonymize mode

Use it in Claude Code and Cowork

The Redact PDF AI plugin bundles the MCP server with two skills: black out personal data before a document is shared, or anonymize it before Claude works on it and put the real names back on your computer afterwards.
Claude Code
/plugin marketplace add dambuchs/redact-pdf-mcp
/plugin install redact-pdf-ai@redact-pdf-ai
Installs from our GitHub marketplace, dambuchs/redact-pdf-mcp.
Cowork
  1. Download the plugin as a zip file.
  2. In Cowork, open Customize → Plugins → Add → Upload plugin and choose the zip.
  3. Use it in a Cowork session that runs on your computer: the server reads your files from your disk.
Download the plugin (.zip)

Docs: Local MCP server

Concepts

The essentials: auth, quota, retries, retention, and supported PII categories.
  • Auth: send your key in X-API-Key (keep keys server-side).
  • Plans and quota: the API is available on every plan and consumes the same page quota as web uploads.
  • Idempotency: use X-Idempotency-Key when retrying POST /v1/jobs.
  • Retention: ephemeral deletes originals after processing; studio keeps originals + masks for Studio review.
  • Statuses: uploaded → analyzing → redacted (or error).
  • PII categories: Person, Email, PhoneNumber, Address, Organization, Date, IBAN, CreditCard.

Docs: PII categories · Idempotency · Retention · Rate limits and quotas · Error handling

Authentication

Use an API key for server-to-server calls. Do not put API keys in browsers or mobile apps.
Validate your key
curl -X GET \
  'https://www.redact-pdf.ai/v1/me' \
  -H 'X-API-Key: YOUR_API_KEY'
Header: X-API-Key: YOUR_API_KEY
Security checklist
  • Store keys in your server environment (not in client code).
  • Use one key per environment (dev/staging/prod) to reduce blast radius.
  • Prefer short-lived workers and job queues for large batches.
  • Log request IDs (from error responses) for support/debugging.

Docs: Authentication

Quickstart

Minimal examples to get started quickly.
Create a job
curl -X POST \
  'https://www.redact-pdf.ai/v1/jobs' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -F 'files=@contract.pdf;type=application/pdf' \
  -F 'pii_categories=["Person","Email","PhoneNumber"]' \
  -F 'pii_included_terms=["Project Titan"]' \
  -F 'pii_excluded_terms=["Acme Corp"]' \
  -F 'retention=ephemeral'
The API returns a job id immediately. Processing happens asynchronously.
Example response
{
  "job_id": "b3f2b2e0-6f30-4f3e-8a7b-2f2a20a7d91c",
  "status": "analyzing",
  "documents": [
    { "id": "7f4f4f85-6b7a-4f88-9a8a-7b9a6a2d2fd0", "status": "uploaded" }
  ]
}
Poll the job until status becomes “redacted”, then download outputs per document.

Docs: cURL Quickstart · Node.js Quickstart · Python Quickstart

Error handling

Errors are JSON with a stable code. Treat quota and rate limits as actionable signals.
Common codes
  • quota_exceeded (HTTP 402): buy credits or upgrade.
  • rate_limited (HTTP 429): backoff and retry.
  • invalid_request (HTTP 400): fix parameters.
  • unauthorized (HTTP 401): key missing/invalid.
Example error response
{
  "error": "Insufficient quota",
  "code": "quota_exceeded",
  "request_id": "req_123"
}
The request_id helps correlate logs and support requests.

PII categories

Choose which PII types to redact per job. If you omit categories, your dashboard defaults apply.
CategoryWhat it targets
PersonPeople names
EmailEmail addresses
PhoneNumberPhone numbers (validated patterns)
AddressPostal addresses
OrganizationCompany / organization names
DateDates and date-times
IBANInternational bank account numbers
CreditCardCredit card numbers
SignatureHandwritten signatures, initials and handwriting (opt-in, never a default)
Tip: if you need a term to never be redacted, set excluded terms in the dashboard preferences.

Redact or anonymize: the mode parameter

Black boxes when the reader must learn nothing; consistent tags when the document must stay readable, for example before it goes into an LLM.
  • mode=redact (default): every detected entity is burned out as a black box.
  • mode=pseudonymize: each person, organization, address, email, phone, date, IBAN and card number becomes a consistent tag such as [Person 1] or [Org 2], identical on every page and for every variant of a name, written in the document's language. The output is still a flattened PDF.
  • GET /v1/documents/{doc_id}/correspondence returns the tag → original table (CSV) so you can restore names in the AI's answer.
  • Same parameter in the MCP server (mode: "pseudonymize") and on the anonymize PDF page.
Pseudonymize a PDF
curl -X POST "https://www.redact-pdf.ai/v1/jobs" \
  -H "X-API-Key: YOUR_API_KEY" \
  -F 'files=@contract.pdf;type=application/pdf' \
  -F 'mode=pseudonymize'

# when the document is "redacted":
curl -L "https://www.redact-pdf.ai/v1/documents/DOC_ID/correspondence" \
  -H "X-API-Key: YOUR_API_KEY" -o correspondence.csv

API Reference (v1)

Practical request examples for the core endpoints. Download the OpenAPI file for the full schema.
Poll a job
curl -X GET \
  'https://www.redact-pdf.ai/v1/jobs/b3f2b2e0-6f30-4f3e-8a7b-2f2a20a7d91c' \
  -H 'X-API-Key: YOUR_API_KEY'
Poll until the job reaches a terminal state (redacted or error).
Download output
curl -L \
  -H 'X-API-Key: YOUR_API_KEY' \
  'https://www.redact-pdf.ai/v1/documents/7f4f4f85-6b7a-4f88-9a8a-7b9a6a2d2fd0/output' \
  -o contract-redacted.pdf
Download the redacted PDF once the document status is redacted.
Delete a job
curl -X DELETE \
  -H 'X-API-Key: YOUR_API_KEY' \
  'https://www.redact-pdf.ai/v1/jobs/b3f2b2e0-6f30-4f3e-8a7b-2f2a20a7d91c'
Deletes the job and associated files (subject to retention).
Best practices
  • Use X-Idempotency-Key for retries (network timeouts happen).
  • Do not embed API keys in browsers or mobile apps. Call from your backend.
  • Use exponential backoff while polling; prefer 1 to 2 s intervals for short jobs.
  • Treat 402 and 429 as actionable signals (quota / rate limit).

Docs: Jobs API · Documents API · Pseudonymize mode

PDF redaction API FAQ

Is there an API to redact PDFs?

Yes. Redact PDF AI provides a REST API that redacts PDFs and images programmatically, using the same AI PII detection and OCR pipeline as the web app and returning an irreversible, flattened file.

How do I redact a PDF via the API?

POST your file to the /v1/jobs endpoint with your API key and chosen PII categories, poll the job until it is done, then download the redacted output. See the curl examples above.

Does the redaction API support batch or bulk processing?

Yes. A single job can include multiple documents, and you can run jobs concurrently for high-volume workloads.

Is the redaction API GDPR compliant, and where is data processed?

Processing runs on Microsoft Azure in the EU (Ireland) and Switzerland, encrypted in transit and at rest, and documents are never used to train AI models.

Can the API delete files immediately after processing?

Yes. Use "ephemeral" retention so files are deleted right after the job completes; otherwise the default retention applies and you can delete any job via the API.

What does the redaction API cost?

There is no separate API plan, add-on or per-call fee. API and MCP jobs draw from the same page balance as the web app: $0.05 per page on Starter ($50 for 1,000 pages a month), about $0.04 on Business, or $0.20 per page with a prepaid pack of 50 pages ($10, $5 for your first pack). Your first document, up to 5 pages, is free. Each page is charged once; re-running a document is free.

Is there a PDF redaction SDK, or do I need one?

You don't need one to redact PDFs from your backend. Redact PDF AI is a plain REST API, so any language that can send an HTTP request can call it, with nothing to install or bundle; generate a typed client from the OpenAPI spec if you want one, and use the official MCP server for AI agents. A PDF SDK is the better fit when users redact by hand in your own viewer, when processing must run offline or on your own servers, or when you need control over the PDF output. The API vs SDK section above compares the options.

Can the API anonymize or pseudonymize documents instead of redacting them?

Yes. Pass mode=pseudonymize and each person, organization, address, email, phone number, date, IBAN and card number becomes a consistent tag such as [Person 1] instead of a black box, identical on every page and written in the document's language. The output is still a flattened PDF, and GET /v1/documents/:doc_id/correspondence returns the tag-to-original table so names can be restored. The MCP server accepts the same mode parameter.

Can I call the PDF redaction API from Python?

Yes, with no package of ours to install. Send the file to POST /v1/jobs with requests (or httpx) and your key in the X-API-Key header, poll GET /v1/jobs/:job_id until the document is redacted, then download GET /v1/documents/:doc_id/output. The Python quickstart in the docs has the complete script.

Can I use the redaction API from Node.js or TypeScript?

Yes. Use the built-in fetch and FormData (Node.js 18 or later) from your server, never from the browser, since the key must stay secret. Generate TypeScript types from the OpenAPI spec if you want typed calls. For AI agents, the redact-pdf-mcp npm package wraps the same API as MCP tools. The Node.js quickstart in the docs shows the full upload, poll and download flow.

Is the redaction API ready for an enterprise security review?

Documents are processed on Microsoft Azure in the EU (Ireland) and Switzerland, encrypted in transit and at rest, and never used to train AI; with ephemeral retention the originals are deleted as soon as the job completes. A DPA is available, the Enterprise plan adds SSO/SAML, and you can issue one key per environment. The SOC 2 and ISO 27001 certifications belong to the Microsoft Azure infrastructure; Redact PDF AI does not hold its own.

Can I run the redaction API on-premise or self-hosted?

No. Redact PDF AI is only offered as a hosted service in the EU and Switzerland; there is no on-premise, container or offline version. If documents may not leave your network, choose a PDF SDK or library you deploy yourself (for example Nutrient, Apryse or GroupDocs.Redaction), pdfRest's self-hosted container, or the open-source Presidio project, and plan to configure or build the detection yourself.