# 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://redactpdf.ai/developers
- OpenAPI (YAML): https://redactpdf.ai/openapi.yaml
- Sign up / API key: https://redactpdf.ai/sign-up

## Why this docs set exists

This markdown documentation is the routing-ready source for a future dedicated docs UI.

For now, it is published as static markdown pages under `/docs/*.md` so teams, search engines, and LLM agents can consume it directly.

## Start here

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

## Documentation map (subpages)

### API Reference

- Authentication: https://redactpdf.ai/docs/api-reference/authentication.md
- Jobs API: https://redactpdf.ai/docs/api-reference/jobs.md
- Documents API: https://redactpdf.ai/docs/api-reference/documents.md

### Guides

- PII Categories: https://redactpdf.ai/docs/guides/pii-categories.md
- Error Handling: https://redactpdf.ai/docs/guides/error-handling.md
- Idempotency: https://redactpdf.ai/docs/guides/idempotency.md
- Retention: https://redactpdf.ai/docs/guides/retention.md
- Rate Limits and Quotas: https://redactpdf.ai/docs/guides/rate-limits.md
- Studio Handoff: https://redactpdf.ai/docs/guides/studio-handoff.md

### Resources

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

## Core API model

- Base URL: `https://api.redactpdf.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

## Quick API example

```bash
curl -X POST "https://api.redactpdf.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://redactpdf.ai/openapi.yaml
- LLM index: https://redactpdf.ai/llms.txt
- This docs index: https://redactpdf.ai/developers.md
