# Redact PDF AI for Developers

Redact PDF AI gives you async, production-ready PDF redaction APIs.

Use it to upload PDFs, detect sensitive entities (PII), and retrieve irreversible redacted outputs.

- Developer page (HTML): https://www.redact-pdf.ai/developers
- OpenAPI (YAML): https://www.redact-pdf.ai/openapi.yaml
- Sign up / API key: https://www.redact-pdf.ai/sign-up

> Note on code samples: examples are illustrative and use placeholder credentials (`YOUR_API_KEY`), so a verbatim run returns `401 Unauthorized`. To execute a real redaction without a key, call the keyless demo `GET https://www.redact-pdf.ai/v1/demo`; for real calls, substitute your own key from Dashboard → Settings → API keys.

## API pricing and quota

The API is available on every plan. API jobs use the same page quota as your subscription and any credit packs, so there is no separate API tier or add-on. A free account gets its first document (up to 5 pages) redacted in full, no card, through the API as well as the app.

## Why this docs set exists

The documentation is available as a browsable HTML docs site at `/docs` for humans, and mirrored as static markdown pages under `/docs/*.md` so teams, search engines, and LLM agents can consume the same content directly.

## Start here

- Introduction: https://www.redact-pdf.ai/docs/introduction.md
- cURL Quickstart: https://www.redact-pdf.ai/docs/quickstart/curl.md
- Node.js Quickstart: https://www.redact-pdf.ai/docs/quickstart/node.md
- Python Quickstart: https://www.redact-pdf.ai/docs/quickstart/python.md

## Documentation map (subpages)

### API Reference

- Authentication: https://www.redact-pdf.ai/docs/api-reference/authentication.md
- Jobs API: https://www.redact-pdf.ai/docs/api-reference/jobs.md
- Documents API: https://www.redact-pdf.ai/docs/api-reference/documents.md
- Account and Demo: https://www.redact-pdf.ai/docs/api-reference/account-and-demo.md

### Guides

- PII Categories: https://www.redact-pdf.ai/docs/guides/pii-categories.md
- Redaction Rules: https://www.redact-pdf.ai/docs/guides/redaction-rules.md
- Pseudonymize Mode: https://www.redact-pdf.ai/docs/guides/pseudonymize.md
- Error Handling: https://www.redact-pdf.ai/docs/guides/error-handling.md
- Idempotency: https://www.redact-pdf.ai/docs/guides/idempotency.md
- Retention: https://www.redact-pdf.ai/docs/guides/retention.md
- Rate Limits and Quotas: https://www.redact-pdf.ai/docs/guides/rate-limits.md
- Studio Handoff: https://www.redact-pdf.ai/docs/guides/studio-handoff.md

### AI Assistants

- Overview (which integration to use): https://www.redact-pdf.ai/docs/ai/overview.md
- Claude Connector: https://www.redact-pdf.ai/docs/ai/claude-connector.md
- Local MCP Server and Claude Plugin: https://www.redact-pdf.ai/docs/ai/mcp-server.md

### Resources

- OpenAPI and Tooling: https://www.redact-pdf.ai/docs/resources/openapi.md
- Integration Examples: https://www.redact-pdf.ai/docs/resources/examples.md

## Core API model

- Base URL: `https://www.redact-pdf.ai`
- Auth header: `X-API-Key: YOUR_API_KEY`
- Async workflow:
  1. `POST /v1/jobs` to upload PDFs and create a job
  2. `GET /v1/jobs/{job_id}` to poll status
  3. `GET /v1/documents/{doc_id}/output` to download redacted output
  4. `DELETE /v1/jobs/{job_id}` to purge job data

## Redact or anonymize (`mode`)

- `mode=redact` (default): detected entities are burned out as black boxes.
- `mode=pseudonymize`: each person, organization, address, email, phone number, 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. Use it to anonymize a document while keeping it readable, e.g. before sending it to an LLM. The output is still a flattened PDF.
- `GET /v1/documents/{doc_id}/correspondence` returns the tag → original table (CSV) so names can be restored.
- The MCP server (`npx -y redact-pdf-mcp`) accepts the same `mode` parameter. Landing page: https://www.redact-pdf.ai/anonymize-pdf

```bash
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'
```

## Connect from Claude or ChatGPT (hosted connector)

Use Redact PDF AI as a connector: sign in with your redact-pdf.ai account once, no API key to copy.

- Claude: add Redact PDF AI from Claude's connector directory (https://claude.ai/directory/redact-pdf-ai), or add a custom connector with the URL `https://mcp.redact-pdf.ai/mcp`. Any MCP client that supports remote servers with OAuth sign-in takes the same URL. Guide: https://www.redact-pdf.ai/integrations/claude
- Sign in with your redact-pdf.ai account when asked. The connector acts only on that account.
- Files: `create_upload_link` gives you a private upload page; the file 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.
- Full reference (tools, limits, sign-in, Claude Code setup): https://www.redact-pdf.ai/docs/ai/claude-connector.md

## Claude plugin (Claude Code and Cowork)

The plugin bundles the MCP server with two skills: redact a document before sharing it, or anonymize it before Claude works on it and restore the names locally afterwards. It installs from our own GitHub marketplace.

- Claude Code: `/plugin marketplace add dambuchs/redact-pdf-mcp`, then `/plugin install redact-pdf-ai@redact-pdf-ai`
- Cowork: download https://www.redact-pdf.ai/downloads/redact-pdf-ai-plugin.zip, then Customize → Plugins → Add → Upload plugin. It runs in Cowork sessions on your computer, not in claude.ai chat.
- The plugin starts `npx -y redact-pdf-mcp@0.5.0` locally. There is no key setting: paste your API key in the conversation and the `set_api_key` tool stores it, or save it once with the command in https://github.com/dambuchs/redact-pdf-mcp/blob/main/plugin/README.md#api-key

Install in other clients (Claude Desktop, Cursor, VS Code, Codex) and set up the API key: https://www.redact-pdf.ai/docs/ai/mcp-server.md

## Quick API example

```bash
curl -X POST "https://www.redact-pdf.ai/v1/jobs" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "X-Idempotency-Key: onboarding-demo-001" \
  -F 'files=@/absolute/path/contract.pdf;type=application/pdf' \
  -F 'pii_categories=["Person","Email","PhoneNumber"]' \
  -F 'retention=ephemeral'
```

Example response:

```json
{
  "job_id": "b3f2b2e0-6f30-4f3e-8a7b-2f2a20a7d91c",
  "status": "analyzing",
  "documents": [
    {
      "id": "7f4f4f85-6b7a-4f88-9a8a-7b9a6a2d2fd0",
      "status": "uploaded"
    }
  ]
}
```

## Status model

Document statuses:

- `uploaded`
- `analyzing`
- `redacting`
- `redacted`
- `error`

Treat `redacted` and `error` as terminal states.

## Error model

Errors are structured JSON with a stable `code` and `request_id`.

```json
{
  "error": "Insufficient quota",
  "code": "quota_exceeded",
  "request_id": "req_123"
}
```

## Canonical references

- OpenAPI: https://www.redact-pdf.ai/openapi.yaml
- LLM index: https://www.redact-pdf.ai/llms.txt
- This docs index: https://www.redact-pdf.ai/developers.md
