Enterprise AI Gateway with Content Filtering & Multi-Provider Support
Protect your company from data leaks when using AI services like ChatGPT, Claude, and others. LLM-Proxy sits between your employees and AI providers, automatically filtering confidential information before it leaves your network.
- Automatic detection and filtering of sensitive data (emails, phone numbers, IPs, etc.)
- Custom filter rules via regex patterns
- Configurable sensitivity levels
- OpenAI (GPT-4, GPT-3.5)
- Anthropic (Claude 3.5, Claude 3)
- Azure OpenAI
- Easy to extend for other providers
- Full audit trail of all AI interactions
- Filter what was removed from requests
- Cost tracking per user/department
- PostgreSQL storage for compliance
- Modern Svelte-based UI
- User management & API key generation
- Real-time usage statistics
- Filter rule configuration
- Deploy on your own infrastructure
- Full data sovereignty
- No data leaves your network (except filtered requests to AI providers)
- Swiss-hosted option available
- Docker & Docker Compose
- (Optional) Domain with SSL certificate
git clone https://github.com/krieger-engineering/llm-proxy.git
cd llm-proxycp .env.example .env
# Edit .env with your settings:
# - Database credentials
# - AI provider API keys
# - Filter rulesdocker-compose up -dOpen http://localhost:3000 in your browser.
Default credentials:
- Username:
admin - Password:
changeme(change immediately!)
βββββββββββββββ
β Employee β
ββββββββ¬βββββββ
β Request with sensitive data
βΌ
βββββββββββββββββββββββββββββββββββ
β LLM-Proxy Gateway β
β βββββββββββββββββββββββββββββ β
β β Content Filter Engine β β β Removes PII, secrets, etc.
β βββββββββββββββββββββββββββββ β
β βββββββββββββββββββββββββββββ β
β β Request Logger β β β Audit trail (PostgreSQL)
β βββββββββββββββββββββββββββββ β
ββββββββ¬βββββββββββββββββββββββββββ
β Filtered request
βΌ
βββββββββββββββββββββββββββββββββββ
β AI Provider (OpenAI, Claude) β
βββββββββββββββββββββββββββββββββββ
| Variable | Description | Default |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | postgres://... |
REDIS_URL |
Redis connection string | redis://localhost:6379 |
OPENAI_API_KEY |
Your OpenAI API key | - |
ANTHROPIC_API_KEY |
Your Anthropic API key | - |
FILTER_MODE |
Filter strictness (strict, moderate, permissive) |
moderate |
LOG_LEVEL |
Logging level (debug, info, warn, error) |
info |
Edit config/filters.yaml:
filters:
- name: "Email Addresses"
pattern: '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}'
replacement: "[EMAIL_REDACTED]"
- name: "Credit Card Numbers"
pattern: '\b\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{4}\b'
replacement: "[CARD_REDACTED]"The proxy supports Weighted Load Balancing across multiple API keys:
providers:
claude:
api_keys:
- key: "primary-key"
weight: 3 # Gets 75% of requests
max_rpm: 300 # Max 300 requests/minute
- key: "backup-key"
weight: 1 # Gets 25% of requests
max_rpm: 100Features:
- Distribute requests based on weight
- Per-key rate limiting (RPM)
- Automatic failover when rate limited
- Works for streaming & non-streaming
π Full Documentation
llm-proxy/
βββ backend/ # Go backend (API gateway)
β βββ cmd/ # Main applications
β βββ internal/ # Internal packages
β βββ pkg/ # Public packages
βββ admin-ui/ # Svelte admin dashboard
βββ landing-page/ # Marketing website
βββ migrations/ # Database migrations
βββ docker-compose.yml # Docker setup
Backend:
cd backend
go run cmd/server/main.goAdmin UI:
cd admin-ui
npm install
npm run dev# Backend tests
cd backend
go test ./...
# Frontend tests
cd admin-ui
npm testdocker-compose -f docker-compose.prod.yml up -dSee docs/kubernetes/ for Helm charts and manifests.
llmproxy.yourdomain.com {
reverse_proxy localhost:8080
}- All API requests require authentication (API keys or JWT)
- Rate limiting to prevent abuse
- TLS/SSL encryption enforced
- Content filtering prevents data leaks
- Audit logs for compliance (GDPR Art. 30)
Security Audit: Last reviewed 2026-03-08
Employees use ChatGPT for customer emails β LLM-Proxy filters customer data automatically
Doctors use AI for medical documentation β HIPAA-compliant filtering of patient names, SSNs
Lawyers research with AI β Client names and case details removed before sending
Developers use AI for code review β API keys, database credentials filtered out
We welcome contributions! Please see CONTRIBUTING.md for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Website: https://scrubgate.com/
- Demo Meeting: Book a 30-min demo
- Email: service@scrubgate.com
- Issues: GitHub Issues
- Support for Google Gemini
- Browser extension for easy integration
- Slack/Teams bot integration
- Advanced analytics dashboard
- Multi-tenancy support
- On-premise deployment assistant
If you find this project useful, please consider giving it a star! β
- Built with Go, Svelte, PostgreSQL
- Inspired by the need for GDPR-compliant AI usage in European companies
- Thanks to all contributors!
Made with β€οΈ in ZΓΌrich, Switzerland π¨π

