API Dokumentation

Named Entity Recognition für deutsche Geschäftsdokumente

Base URL: https://api.anonquick.com/api/v1/

Schnellstart

  1. API-Key im Dashboard erstellen
  2. Key als Bearer Token im Authorization Header senden
  3. POST Request an gewünschten Endpoint senden

API interaktiv testen

Unterstützte Entity-Typen

TypBeschreibungBeispiel
PERPersonennamenMax Mustermann
ORGOrganisationenDeutsche Bahn
LOCOrteDeutschland
EMAILE-Mail-Adresseninfo@firma.de
PHONETelefonnummern+49 171 1234567
VAT_IDUSt-IdNr.DE123456789
POSTAL_CODEPostleitzahlen80331
CITYStädteMünchen
STREETStraßenKönigsturmstraße 5
COMPANY_NAMEFirmennamenSETU GmbH
WEBSITEURLswww.firma.de
TypeDescriptionExample
PERSONPerson namesJohn Smith
ORGOrganizationsApple Inc.
GPECountries, citiesUnited States
EMAILEmail addressesjohn@example.com
PHONEPhone numbers+1-555-123-4567
DATEDatesJanuary 1st, 2024
MONEYMoney$100
WEBSITEURLshttps://example.com

Authentifizierung

Alle API-Anfragen benötigen einen Bearer Token im Authorization Header.

HTTP Header
Authorization: Bearer YOUR_API_KEY
Sicherheit: Speichere deinen API-Key niemals in öffentlichem Code.

Text-Verarbeitung

Erkennung und Anonymisierung von Entitäten in deutschen Geschäftstexten.

Extract named entities from text with position information and confidence scores. Includes advanced German business entity detection.

Enhanced German Business Detection

Detects emails, phone numbers, German streets, cities, VAT IDs, postal codes, and company names beyond standard spaCy entities.

Request Parameters
FieldTypeRequired
textString
modelStringOptional
apply_input_cleanupBooleanOptional
Response Structure
{
  "entities": [
    {
      "text": "Max Mustermann",
      "label": "PER",
      "start": 0,
      "end": 14
    }
  ],
  "entity_count": 5,
  "cost": 0.00163,
  "exec_time": 885
}
Example: German Business Text
curl -X POST https://api.anonquick.com/api/v1/text/extract-entities \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Max Mustermann arbeitet bei ABC GmbH in München. Email: max@mustermann.de, Tel: +49 89 123456",
    "apply_input_cleanup": true
  }'

Gibt Text mit Zeichenzahl und Wortzahl zurück. Konsistent mit /pdf/extract-text.

Request Parameters
FieldTypeRequired
textString
Response Structure
{
  "success": true,
  "text": "Der übergebene Text...",
  "character_count": 1250,
  "word_count": 210,
  "cost": 0.00125,
  "credits_used": 1625,
  "exec_time": 5
}

Replace named entities in text with custom anonymization patterns for GDPR compliance and business document processing.

GDPR Compliant Anonymization

Professional text anonymization with intelligent cleanup for German business documents. Supports [NAME] placeholders and clean tilde consolidation.

Request Parameters
FieldTypeRequired
textString
entity_setStringGDPR oder ALL
modelStringOptional (default: de_core_news_sm)
unique_keysBooleanOptional (default: true)
apply_input_cleanupBooleanOptional (default: true)
apply_output_cleanupBooleanOptional (default: true)
ner_trackingBooleanOptional (default: false) - Request für Qualitätsanalyse speichern

entity_set: GDPR = Personen, E-Mail, Telefon, IBAN, Passwort. ALL = inkl. Org, Ort, Datum, Straße, PLZ, etc.

Response Structure
{
  "modified_text": "[NAME_1] arbeitet bei ~ in ~. Email: [EMAIL_1]",
  "entities_found": 5,
  "replacements_made": 5,
  "replacement_map": {"[NAME_1]": "Max Mustermann", ...},
  "cost": 0.00163,
  "exec_time": 885
}
Example: German Business Anonymization (Unified)
curl -X POST https://api.anonquick.com/api/v1/text/redact-entities \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Max Mustermann arbeitet bei ABC GmbH in München. Email: max@mustermann.de, Tel: +49 89 123456",
    "entity_set": "GDPR"
  }'

Token-optimierte Text-Anonymisierung. Gibt nur den anonymisierten Text und essenzielle Metadaten zurück. Ideal für Workflow-Automation.

Request Parameters
FieldTypeRequired
textString
entity_setStringGDPR oder ALL
modelStringOptional (default: de_core_news_sm)
unique_keysBooleanOptional (default: true)
ner_trackingBooleanOptional (default: false) - Für Qualitätsanalyse speichern
Response Structure
{
  "success": true,
  "redacted_text": "[NAME_1] arbeitet bei ~...",
  "original_text": "Max Mustermann arbeitet bei...",
  "entity_count": 5,
  "replacements_made": 5,
  "replacement_map": {"[NAME_1]": "Max Mustermann"},
  "cost": 0.00163,
  "credits_used": 1250,
  "exec_time": 85
}
Example: Token-Optimized Request
curl -X POST https://api.anonquick.com/api/v1/text/redact-text \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Max Mustermann arbeitet bei ABC GmbH. Email: max@test.de",
    "entity_set": "GDPR"
  }'

PDF Processing Endpoints

Professional PDF document anonymization with AI agent optimization for searchable PDFs.

AI Agent Token Optimization

Use URL input/output instead of base64 to reduce token usage by 90%+. Perfect for n8n, Zapier, and Make.com workflows.

Token Efficient

Extract named entities from PDF files with page-level mapping and position information. Supports URL input for AI agents.

AI Agent Optimized

Use "url": "https://example.com/document.pdf" for input to drastically reduce token usage instead of base64.

Request Parameters
FieldTypeRequired
filePDF File✓ (or url)
urlString✓ (or file)
modelStringOptional
Response Structure
{
  "success": true,
  "page_count": 2,
  "entity_count": 15,
  "page_entities": {
    "1": [...],
    "2": [...]
  },
  "cost": 0.0125,
  "exec_time": 145
}
Example: URL Input (AI Agents)
curl -X POST https://api.anonquick.com/api/v1/pdf/extract-entities \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/document.pdf"
  }'
Example: Form-Data Upload
curl -X POST https://api.anonquick.com/api/v1/pdf/extract-entities \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf" \
  -F "model=de_core_news_sm"

Professional PDF anonymization with black rectangle redaction and AI agent optimization for searchable PDFs.

Professional Visual Redaction

Uses solid black rectangles over detected entities for industry-standard document anonymization that meets GDPR compliance requirements.

AI Agent Token Optimization

Input: "url": "https://example.com/document.pdf" statt Base64 reduziert Token-Verbrauch erheblich. Nutze output_format: "file" für direkten PDF-Download.

Tipp: Für LLM-Chat-Workflows mit Session-Support nutzen Sie /pdf/redact-text statt dieses Endpoints. Dieser Endpoint ist für visuelle Archivierung (schwarze Balken).
Request Parameters
FieldTypeDescription
filePDF FilePDF als Datei-Upload (FormData)
b64Base64Alternative: PDF als Base64-String
urlStringAlternative: URL zur PDF-Datei
entity_setStringGDPR (default) oder ALL
output_formatStringb64 (default), file
include_info_pageBooleanInfo-Seite anhängen (default: true)
test_modeBooleanRoter Durchstrich statt Schwärzung (default: false)
ner_trackingBooleanNER-Logging für Optimierung (default: false)
session_idStringSession-ID für Fortsetzung
ttl_minutesIntegerSession-TTL in Minuten (max: 1440)
unique_keysBooleanEindeutige Ersetzungen (default: true)
passthroughAnyDurchreichung für n8n/Workflows
PDF-Input: Einer von file, b64, oder url
Output Format Options
  • b64 Base64 JSON response (default)
  • file Direct PDF download
Response (b64)
{
  "pdf_data": "JVBERi0xLjQK...",
  "redacted_text": "Anonymisierter Text",
  "original_text": "Original Text",
  "entities_found": 12,
  "replacements_made": 12,
  "replacement_log": [...],
  "replacement_map": {...},
  "cost": 2500,
  "credits_used": 2500,
  "exec_time": 245,
  "session_id": "abc123",
  "session_continued": false,
  "message_count": 1,
  "include_info_page": true
}
Example: Datei-Upload (FormData - empfohlen für Test-UI)
curl -X POST https://api.anonquick.com/api/v1/pdf/redact-pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf" \
  -F "entity_set=GDPR" \
  -F "model=auto"
Example: URL Input/Output (AI Agents)
curl -X POST https://api.anonquick.com/api/v1/pdf/redact-pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/document.pdf",
    "entity_set": "GDPR"
  }'
Example: Base64 Input/Output (n8n)
curl -X POST https://api.anonquick.com/api/v1/pdf/redact-pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "b64": "JVBERi0xLjQKJeLjz9MKM...",
    "entity_set": "GDPR",
    "output_format": "b64"
  }'
Response (b64)
{
  "success": true,
  "pdf_data": "JVBERi0xLjQKJeLjz9MKM...",
  "filename": "redacted_document.pdf",
  "entities_found": 12,
  "replacements_made": 12,
  "cost": 0.025,
  "exec_time": 245
}
Example: DSGVO/GDPR Complete Anonymization
DSGVO/GDPR Compliance

Use "ALL": "~" to anonymize all personal data types with a single parameter for complete GDPR compliance.

curl -X POST https://api.anonquick.com/api/v1/pdf/redact-pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "b64": "JVBERi0xLjQKJeLjz9MKM...",
    "entity_set": "ALL",
    "output_format": "b64"
  }'

Token-optimized PDF redaction that returns only anonymized text instead of PDF files. Perfect for AI workflows and automation platforms. Chat-Session Support

Request Parameters
FieldTypeRequired
filePDF File (Base64)✓ (or url)
urlString✓ (or file)
entity_setStringGDPR oder ALL
modelStringOptional (default: de_core_news_sm)
session_idStringOptional: Session fortsetzen
ttl_minutesIntegerSession-TTL (1-1440, Default: 30)
unique_keysBooleanOptional (default: true)
ner_trackingBooleanOptional (default: false) - Für Qualitätsanalyse speichern

entity_set: Vereinheitlicht mit /llm/preproc. GDPR oder ALL.

Response Structure
{
  "redacted_text": "[NAME_1] arbeitet bei...",
  "original_text": "Max Mustermann arbeitet bei...",
  "entities_found": 5,
  "replacements_made": 5,
  "cost": 2500,
  "credits_used": 2500,
  "exec_time": 245,
  "replacement_log": [...],
  "replacement_map": {"[NAME_1]": "Max"},
  "session_id": "uuid-für-chat",
  "session_continued": false,
  "message_count": 1,
  "total_entities_in_session": 5,
  "note": "Text-only output..."
}
Example: AI Agent Token Optimization (Unified)
curl -X POST https://api.anonquick.com/api/v1/pdf/redact-text \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/document.pdf",
    "entity_set": "GDPR"
  }'
Cross-Document Workflow: Die session_id aus der PDF-Response kann an /llm/preproc übergeben werden. So bleiben Entities wie "Klaus" im PDF und "klaus" im Chat-Text konsistent als [NAME_1].

Extract plain text from PDF documents without entity analysis. Useful for text preprocessing or content analysis.

Request Parameters
FieldTypeRequired
filePDF File✓ (or url)
urlString✓ (or file)
Response Structure
{
  "success": true,
  "text": "Extracted text content...",
  "page_count": 3,
  "total_characters": 1245,
  "cost": 0.0075,
  "exec_time": 89
}
Example: URL Input
curl -X POST https://api.anonquick.com/api/v1/pdf/extract-text \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/document.pdf"}'

LLM Processing WORKFLOW

Pre- und Post-Processing Endpunkte für LLM-Workflow-Integration. Anonymisieren vor der AI, wiederherstellen nach der Verarbeitung.

Workflow-Ablauf
1. E-Mail einlesen 2. /llm/preproc 3. AI Agent 4. /llm/postproc 5. Antwort senden

Anonymisiert Text bevor er an ein LLM gesendet wird. Gibt nummerierte Platzhalter wie [PERSON_1], [EMAIL_1] zurück und eine Session-ID zur Wiederherstellung.

Request Parameter
ParameterTypStandardBeschreibung
textsObject-Erforderlich. Object mit benannten Keys, z.B. {"subject": "...", "content": "..."}. Response gibt anonymized_texts mit denselben Keys zurück.
session_idString-Chat-Session Session-ID aus vorherigem Aufruf. Ermöglicht konsistentes Mapping über mehrere Nachrichten (z.B. "Max Müller" bleibt immer [NAME_1]).
entity_setStringGDPREntitäts-Set: GDPR (Personen, E-Mail, Telefon, IBAN, Passwort) oder ALL (inkl. Org, Ort, Datum, Straße, PLZ, etc.)
ttl_minutesInteger30Session-Lebensdauer in Minuten (1-1440, max 24h). Bei Fortsetzung wird Ablaufzeit erneuert (Sliding Expiration).
convert_htmlString/BoolautoHTML zu Plaintext konvertieren: auto (automatische Erkennung), true (immer), false (nie). Reduziert Token-Kosten erheblich.
passthroughAny-Beliebige Daten die unverändert in der Response zurückgegeben werden (z.B. E-Mail-ID, Workflow-State).
ner_trackingBooleanfalseRequest für NER-Qualitätsanalyse in Datenbank speichern. Nur für Test-/Debugging-Zwecke aktivieren.
GDPR Entity Set

Optimiert für AI - behält Kontext für besseres Verständnis:

[PERSON], [EMAIL], [PHONE], [IBAN], [PASSWORD]
ALL Entity Set

Maximale Anonymisierung - alle erkannten Entitäten:

[PERSON], [ORG], [LOCATION], [EMAIL], [PHONE], [IBAN], [VAT_ID], [PASSWORD], [WEBSITE], [POSTAL_CODE], [STREET], [CITY], [TITLE_NAME], [DATE], [MONEY]
Response
{
  "success": true,
  "session_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "anonymized_texts": {
    "subject": "Anfrage von [NAME_1]",
    "content": "Hallo, [NAME_1] ([EMAIL_1]) bittet um..."
  },
  "entities_found": 5,
  "replacements_made": 3,
  "expires_in_minutes": 30,
  "cost": 2500,
  "credits_used": 1350,
  "credits_remaining": 48650000,
  "calls_used": 1,
  "exec_time": 45,
  "session_continued": false,
  "message_count": 1,
  "total_entities_in_session": 2
}
Chat-Session Unterstützung

Für Chatverläufe mit konsistentem Entity-Mapping:

  1. Erste Nachricht: Ohne session_id senden → erhält neue Session-ID
  2. Folgenachrichten: Mit session_id senden → bestehendes Mapping wird wiederverwendet
  3. Beispiel: "Max Müller" wird in allen Nachrichten konsistent zu [NAME_1]
Beispiele

E-Mail mit Subject + Content:

curl -X POST https://api.anonquick.com/api/v1/llm/preproc \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "texts": {
      "subject": "Anfrage von Max Müller",
      "content": "Herr Müller (max.mueller@firma.de) bittet um Rückruf."
    },
    "entity_set": "GDPR"
  }'

n8n Expression (HTML-E-Mail):

{
  "texts": {
    "subject": {{ $json.subject.toJsonString() }},
    "content": {{ $json.body.toJsonString() }}
  },
  "convert_html": "auto",
  "entity_set": "GDPR"
}

Chat-Session fortsetzen:

curl -X POST https://api.anonquick.com/api/v1/llm/preproc \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "session_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "texts": {
      "message": "Max Müller hat noch eine Frage zu seinem Vertrag."
    }
  }'
// Max Müller wird wieder zu [NAME_1] (wie in vorheriger Nachricht)
Tipp: Wenn session_id: null zurückgegeben wird, wurden keine Entitäten gefunden. Der Text kann trotzdem verarbeitet werden - beim Postproc einfach dieselbe session_id: null übergeben.

Stellt die Originaldaten in LLM-verarbeiteten Texten wieder her. Ersetzt Platzhalter wie [PERSON_1] mit den in der Session gespeicherten Originalwerten.

texts Object Format (wie preproc)

Input: {"texts": {"subject": "...", "content": "..."}}
Output: {"restored_texts": {"subject": "...", "content": "..."}}

Request Parameter
ParameterTypStandardBeschreibung
session_idString-Erforderlich. Die Session-ID vom Preproc-Aufruf. Bei leer wird Input unverändert zurückgegeben.
textsObject-Erforderlich. Object mit benannten Keys (wie bei preproc). Alle String-Werte werden rekursiv de-anonymisiert.
delete_sessionBooleantrueSession nach Verarbeitung löschen. Bei false bleibt die Session bis TTL-Ablauf erhalten.
passthroughAnynullBeliebige Daten, die unverändert in der Response zurückgegeben werden (Workflow-Kontext).
Response Beispiel
{
  "success": true,
  "restored_texts": {
    "subject": "Anfrage von Max Müller - Termin",
    "content": "Herr Max Müller (max.mueller@firma.de, +49 89 12345) hat..."
  },
  "replacements_made": 5,
  "session_deleted": true,
  "source": "memory"
}
Beispiele

Standard (E-Mail mit subject/content):

curl -X POST https://api.anonquick.com/api/v1/llm/postproc \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "session_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "texts": {
      "subject": "Anfrage von [NAME_1] - Termin",
      "content": "Sehr geehrter [NAME_1], Ihre Anfrage wurde bearbeitet."
    }
  }'

AI-Agent Output (erweiterte Struktur):

curl -X POST https://api.anonquick.com/api/v1/llm/postproc \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "session_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "texts": {
      "summary": "[NAME_1] benötigt Hilfe mit dem Vertrag",
      "suggested_reply": "Sehr geehrter [NAME_1], wir kümmern uns um Ihr Anliegen.",
      "priority": "high"
    }
  }'

Mit passthrough für Workflow-Kontext:

curl -X POST https://api.anonquick.com/api/v1/llm/postproc \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "session_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "texts": {"content": "Antwort für [NAME_1]"},
    "delete_session": false,
    "passthrough": {"email_id": "msg123", "step": 5}
  }'
n8n/Make.com Integration

In Workflow-Automation-Tools wie n8n oder Make.com:

  1. Preproc Node: E-Mail-Body an /llm/preproc senden → session_id + anonymized_text erhalten
  2. AI Agent Node: anonymized_text an OpenAI/Claude senden → Antwort als JSON erhalten
  3. Postproc Node: session_id + AI-Output als data an /llm/postproc senden → personalisierte Antwort erhalten
Fehler-Codes
HTTPBedeutung
404Session nicht gefunden (bereits abgelaufen oder falsche ID)
403Session gehört zu einem anderen API-Key
410Session abgelaufen (TTL überschritten)

Automation Integration

Kompletter n8n Workflow für E-Mail-Anonymisierung mit AI-Integration.

n8n Workflow Preview
E-Mail Anonymisierung mit n8n & AI

Dieser Workflow zeigt die komplette Integration von AnonQuick in einen n8n E-Mail-Automatisierungsworkflow:

  • Anonymize Input Data: E-Mail-Inhalte werden vor der AI-Verarbeitung anonymisiert
  • AI Agent Processing: OpenAI verarbeitet die anonymisierten Daten sicher
  • De-Anonymize Answer: Die AI-Antwort wird mit den Originaldaten re-personalisiert
  • Inbox Cleanup: Automatische Kategorisierung und Archivierung
Quick Setup
  1. Workflow-JSON herunterladen und in n8n importieren
  2. AnonQuick API-Key im Dashboard erstellen
  3. API-Key als "Header Auth" Credential in n8n einrichten (Authorization: Bearer YOUR_KEY)
  4. E-Mail-Verbindung (Outlook/Gmail) konfigurieren
  5. OpenAI API-Key hinzufügen - fertig!