Entwickler
Redaction API
PDFs programmgesteuert schwärzen mit derselben sicheren Pipeline wie die Web-App: Azure OCR + PII-Erkennung + irreversible rasterisierte Schwärzung.
Async-Jobs
Eine oder mehrere PDFs hochladen, Status pollen, dann geschwärzte Outputs herunterladen.
PII-Kontrollen
PII-Kategorien pro Job wählen und Standard-Einstellungen im Dashboard behalten.
Aufbewahrung
Standardmäßig no-retention für API-Workflows, optionaler Studio-Review-Modus bei Bedarf.
Konzepte
Das Wichtigste: Auth, Retries, Aufbewahrung und unterstützte PII-Kategorien.
  • Auth: Key in X-API-Key senden (Keys serverseitig halten).
  • Idempotenz: X-Idempotency-Key bei Retries von POST /v1/jobs verwenden.
  • Aufbewahrung: ephemeral löscht Originale nach Verarbeitung; studio behält Originale + Masken für Studio-Review.
  • Statuses: uploaded → analyzing → redacted (oder error).
  • PII-Kategorien: 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://api.redactpdf.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
Minimale Beispiele, um schnell zu starten.
Job erstellen
curl -X POST \
  'https://api.redactpdf.ai/v1/jobs' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -F 'files=@contract.pdf;type=application/pdf' \
  -F 'pii_categories=["Person","Email","PhoneNumber"]' \
  -F 'retention=ephemeral'
Die API liefert sofort eine Job-ID zurück. Die Verarbeitung läuft asynchron.
Beispielantwort
{
  "job_id": "b3f2b2e0-6f30-4f3e-8a7b-2f2a20a7d91c",
  "status": "analyzing",
  "documents": [
    { "id": "7f4f4f85-6b7a-4f88-9a8a-7b9a6a2d2fd0", "status": "uploaded" }
  ]
}
Job pollen bis Status “redacted”, dann Outputs pro Dokument herunterladen.
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-Referenz (v1)
Praktische Request-Beispiele für die Kernendpoints. Lade die OpenAPI-Datei für das vollständige Schema herunter.
Job pollen
curl -X GET \
  'https://api.redactpdf.ai/v1/jobs/b3f2b2e0-6f30-4f3e-8a7b-2f2a20a7d91c' \
  -H 'X-API-Key: YOUR_API_KEY'
Pollen, bis der Job einen terminalen Status erreicht (redacted oder error).
Output herunterladen
curl -L \
  -H 'X-API-Key: YOUR_API_KEY' \
  'https://api.redactpdf.ai/v1/documents/7f4f4f85-6b7a-4f88-9a8a-7b9a6a2d2fd0/output' \
  -o contract-redacted.pdf
Lade das geschwärzte PDF herunter, sobald der Dokumentstatus redacted ist.
Job löschen
curl -X DELETE \
  -H 'X-API-Key: YOUR_API_KEY' \
  'https://api.redactpdf.ai/v1/jobs/b3f2b2e0-6f30-4f3e-8a7b-2f2a20a7d91c'
Löscht den Job und zugehörige Dateien (abhängig von der Aufbewahrung).
Best practices
  • Nutze X-Idempotency-Key für Retries (Netzwerk-Timeouts passieren).
  • API-Keys nicht in Browsern oder mobilen Apps verwenden. Nur serverseitig aufrufen.
  • Beim Polling exponentielles Backoff nutzen; 1–2s Intervalle für kurze Jobs.
  • 402 und 429 als klare Signale behandeln (Quota / Rate limit).