API Documentation

RedactPath provides a single endpoint to redact PII from text using Claude Haiku. The full API surface for v0.1.0.

Authentication

All API requests require an API key in the Authorization header:

Authorization: Bearer rpath_YOUR_API_KEY

Get your API key from the dashboard after signing up.

POST /v1/redact POST

Redact PII from a text input.

Request body

{
  "text": "John Doe sent an email to jane@example.com about the deal.",
  "language": "auto",
  "categories": ["NAME", "EMAIL", "PHONE", "ADDRESS"],
  "preserve_format": true
}
FieldTypeRequiredDefaultDescription
textstringyesText to redact (max 100,000 chars)
languagestringno"auto""auto", "en", "ja", "es", "fr", "de", "zh", "ko"
categoriesstring[]noall 8Subset of NAME, EMAIL, PHONE, ADDRESS, CREDIT_CARD, SSN, DOB, IP
preserve_formatbooleannotrueIf true, redactions roughly preserve original length

Success response 200

{
  "redacted_text": "[NAME] sent an email to [EMAIL] about the deal.",
  "redactions": [
    {"original": "John Doe", "category": "NAME", "position": [0, 8]},
    {"original": "jane@example.com", "category": "EMAIL", "position": [27, 43]}
  ],
  "char_count": 56,
  "calls_consumed": 1,
  "calls_remaining": 99,
  "tier": "free"
}

Error responses

GET /v1/usage GET

Current month usage + tier info.

Success response 200

{
  "tier": "standard",
  "call_count_month": 847,
  "included_calls": 3000,
  "calls_remaining": 2153,
  "overage_calls": 0,
  "overage_cost_usd": 0,
  "month_reset_ts": 1735689600000
}

PII categories

CategoryTokenExamples
NAME[NAME]Person names ("John Doe", "山田太郎")
EMAIL[EMAIL]Email addresses
PHONE[PHONE]Phone numbers (E.164 + national formats)
ADDRESS[ADDRESS]Street addresses
CREDIT_CARD[CREDIT_CARD]Credit card numbers (Luhn-valid)
SSN[SSN]US Social Security Numbers
DOB[DOB]Dates of birth
IP[IP]IPv4 + IPv6 addresses

Code examples

curl

curl https://api.redactpath.com/v1/redact \
  -H "Authorization: Bearer rpath_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "John Doe sent jane@example.com"}'

Python

import requests

resp = requests.post(
    "https://api.redactpath.com/v1/redact",
    headers={"Authorization": "Bearer rpath_YOUR_KEY"},
    json={"text": text}
)
result = resp.json()
print(result["redacted_text"])

Node.js

const resp = await fetch("https://api.redactpath.com/v1/redact", {
  method: "POST",
  headers: {
    "Authorization": "Bearer rpath_YOUR_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ text })
});
const result = await resp.json();
console.log(result.redacted_text);

Rate limits

RedactPath itself has no hard rate limit beyond tier monthly quota. The upstream Anthropic Claude API has per-account limits; if you exceed them, requests return 502 with a retry-after suggestion.

For high-volume Pro users, contact us about routing through a dedicated Anthropic account (= no additional cost beyond Pro $29/month).

Privacy + retention