Status: [LIVE] Endpoints found: https://api.anthropic.com/v1/messages Source: https://github.com/grepture/proxy # Grepture Proxy An LLM API proxy that detects and redacts PII, blocks sensitive content, and tokenizes fields — all before requests reach your AI provider. ## Quick Start ```bash # Copy and edit the example rules cp rules.example.json rules.json # Start the proxy bun run src/index.ts ``` The proxy starts on port `4001` by default. Send requests through it by setting the `X-Grepture-Target` header to your upstream API: ```bash curl http://localhost:4001/proxy/ \ -H "Authorization: Bearer any-token" \ -H "X-Grepture-Target: https://api.anthropic.com/v1/messages" \ -H "X-Grepture-Auth-Forward: Bearer sk-ant-..." \ -H "Content-Type: application/json" \ -d '{ "model": "claude-sonnet-4-5-20250514", "max_tokens": 1024, "messages": [{"role": "user", "content": "My email is john@example.com"}] }' ``` The proxy will redact `john@example.com` before it reaches the API, based on your rules. ## Configuration | Environment Variable | Required | Default | Description | |---------------------|----------|---------|-------------| | `GREPTURE_API_KEY` | No | — | If set, only requests with this Bearer token are allowed. If unset, any token is accepted. | | `GREPTURE_RULES_FILE` | No | `rules.json` | Path to rules configuration file | | `GREPTURE_PLUGINS` | No | — | Comma-separated paths to plugin modules to load at startup | | `PORT` | No | `4001` | Port to listen on | | `R2_ENDPOINT` | No (cloud mode) | — | S3-compatible endpoint for body offload (e.g. `https://.r2.cloudflarestorage.com`) | | `R2_ACCESS_KEY_ID` | No (cloud mode) | — | Access key with `Object Write` permission on the bucket | | `R2_SECRET_ACCESS_KEY` | No (cloud mode) | — | Secret key paired with `R2_ACCESS_KEY_ID` | | `R2_BUCKET` | No (cloud mode) | — | Bucket name where large bodies are stored | ### Body Storage The proxy logs request and response bodies as part of its traffic log. For local-mode runs, bodies are written to `stdout` and there is no size li