Developers
Redaction API
Redact PDFs programmatically using the same secure pipeline as the web app: Azure OCR + PII detection + irreversible rasterized redaction.
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 offers a REST API to redact PDFs and images programmatically. You POST a document, the API detects PII with AI (names, emails, IBANs, and more) plus OCR for scans, and you can pass terms to always redact or keep visible. It then returns an irreversible, flattened redacted file. The API is available on every plan and uses the same page quota as your web app subscription or credit balance.

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.
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.
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.
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
Tip: if you need a term to never be redacted, set excluded terms in the dashboard preferences.
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–2s intervals for short jobs.
  • Treat 402 and 429 as actionable signals (quota / rate limit).
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 (Frankfurt) 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?

The API is included 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.