# KI-Anonymisierungs-Gateway

Zentraler DSGVO-konformer Proxy zwischen Klinik-Systemen und KI-APIs (Claude, OpenAI).

## Was es tut

1. Empfängt KI-Anfragen aus dem Kliniknetz
2. Erkennt personenbezogene Daten (Namen, KVNR, Adressen, Geburtsdaten, Telefon, IBAN, E-Mail)
3. Ersetzt sie durch Platzhalter (`[PATIENT_001]`, `[KVNR_001]` etc.)
4. Leitet den anonymisierten Text an die KI-API weiter
5. Re-identifiziert die KI-Antwort (Platzhalter → echte Daten)
6. Liefert die vollständige Antwort zurück

Das Mapping existiert nur im RAM — nie auf der Festplatte.

## Installation

```powershell
irm https://downloads.c3po42.de/ki-gateway/install.ps1 | iex
```

## Starten

```bash
cd C:\KI-Gateway
python main.py
```

Dashboard: http://localhost:8600

## Architektur

```
Arbeitsplatz → Sophos Firewall (blockiert KI-Domains)
                    ↓
              KI-Gateway :8600
                    ↓
         Anonymisierung → KI-API → Re-Identifikation
                    ↓
              Arbeitsplatz
```

## Proxy-Endpoints

| Endpoint | Ziel-API |
|----------|----------|
| POST /v1/messages | Claude (api.anthropic.com) |
| POST /v1/chat/completions | OpenAI (api.openai.com) |
| GET / | Admin-Dashboard |
| GET /produkt | Produktseite |
| GET /api/health | Status |

## Links

- Live-Demo: https://ki-gateway.c3po42.de
- Produktseite: https://ki-gateway.c3po42.de/produkt
- Download: https://downloads.c3po42.de
- Handbuch: https://ki-gateway.c3po42.de/docs/handbuch
