Send through the gateway
SDKs, CLI tools, browser workflows, and internal apps point to PromptProxy instead of calling providers directly.
Teams are already using ChatGPT, Claude, Cursor, CLI tools, and AI SDKs every day. PromptProxy gives security teams a practical way to detect and redact sensitive values before they leave the organization.
dc11.company.com 10.10.5.30 simon.smith@company.com
srv1942.northbridge.local 203.0.113.42 user.marlow@northbridge.com
dc11.company.com 10.10.5.30 simon.smith@company.com
why it exists
They happen during normal work: an engineer pastes logs into Claude, a developer asks ChatGPT to explain an internal hostname, or someone sends a customer email thread to an AI tool for summarization.
Blocking AI completely usually fails. PromptProxy is designed for the middle ground: let people keep working, but reduce what sensitive data reaches external providers.
how it works
PromptProxy sits between users and AI providers. It authenticates the user, checks policy, scans the request locally, replaces sensitive values with stable surrogates, and verifies the sanitized payload before forwarding it upstream.
SDKs, CLI tools, browser workflows, and internal apps point to PromptProxy instead of calling providers directly.
Text, tool arguments, tool results, and decoded base64 text are scanned locally using deterministic rules.
Internal values are replaced with realistic surrogates. A verifier checks the request again before it leaves.
The provider response is mapped back for the user, while findings and policy events are recorded for review.
browser guard
PromptProxy Guard runs on managed AI sites and follows central policy. It helps security teams cover browser-based usage without trying to intercept all user traffic at the network layer.
policy modes
Rollout does not need to start with blocking. Most teams begin in monitor mode, learn what users are sending, tune the rules, and then move higher-risk groups into redaction or blocking.
Detect findings and record activity without modifying the prompt. Useful during pilots and rule tuning.
Sensitive values are replaced locally before the request leaves. Users still get useful responses back.
If a request matches a forbidden category, the gateway rejects it before it reaches the provider.
If the gateway is unavailable or the verifier finds a remnant in the sanitized payload, the request is blocked.
admin console
The console gives teams a place to review sessions, findings, alerts, extension health, policies, vault access, and audit activity. It is built for day-to-day operations, not just dashboards.
coverage
Base64 UTF-8 content is decoded, scanned, redacted, and re-encoded so encoded text does not bypass policy.
OpenAI function arguments and Anthropic tool use / tool result blocks are walked as text so agent workflows stay covered.
Images, documents, audio, and files are counted and audited. Admins can block them when text-only workflows are required.
Users authenticate with PromptProxy keys. Provider keys stay server-side and can be managed centrally.
SSE responses are restored safely as they stream back, including surrogate values that span chunk boundaries.
Original values stay encrypted. Reveal requires permission, a reason, and an audit event.
bypass guards
Sensitive data does not always arrive as plain text. Users paste encoded values, logs, screenshots, and tool outputs. PromptProxy handles the text paths directly and makes non-text content visible to policy.
PromptProxy looks for base64 text runs, decodes them to UTF-8, scans the decoded content, substitutes surrogates, and re-encodes the result before forwarding.
# original request body { "prompt": "ZGMxMS5jb21wYW55LmNvbSAxMC4xMC41LjMw" } # decoded inside PromptProxy "dc11.company.com 10.10.5.30" ↑ 2 findings · domain, ipv4 # request actually forwarded { "prompt": "c3J2MTk0Mi5ub3J0aGJyaWRnZS5sb2NhbCAyMDMuMC4xMTMuNDI=" } "srv1942.northbridge.local 203.0.113.42"
Images, documents, files, and audio are not treated as invisible. Requests report what they carried, and admins can block binary content when policy requires it.
X-PromptProxy-Inspected-Texts
number of text blocks scanned
X-PromptProxy-Uninspected-Blocks
for example image=2,document=1,tool_use=1
multimodal_content_received
audit row for every non-text request
block_binary_content
runtime toggle that can reject uploads with an alert
API key handling
PromptProxy separates the key a user holds from the key used to call OpenAI or Anthropic.
Users authenticate to the gateway with a pp_ key. The gateway resolves the
correct upstream provider key server-side.
pp_ key.
Issued from the admin console and scoped to a user, role, and tenant.
OPENAI_BASE_URL or ANTHROPIC_BASE_URL points to the
gateway.
pp_ key.
curl -i https://promptproxy.company.local/openai/v1/chat/completions \
-H "Authorization: Bearer pp_your_gateway_key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{ "role": "user", "content": "check dc11.company.com 10.10.5.30" }
]
}'
from openai import OpenAI
client = OpenAI(
base_url="https://promptproxy.company.local/openai/v1",
api_key="pp_your_gateway_key",
)
resp = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "analyze dc11.company.com"}],
)
print(resp.choices[0].message.content)
import Anthropic from "@anthropic-ai/sdk";
const anthropic = new Anthropic({
baseURL: "https://promptproxy.company.local/anthropic",
apiKey: "pp_your_gateway_key",
});
const msg = await anthropic.messages.create({
model: "claude-3-5-sonnet-latest",
max_tokens: 256,
messages: [{ role: "user", content: "check dc11.company.com" }],
});
export ANTHROPIC_BASE_URL="https://promptproxy.company.local/anthropic"
export ANTHROPIC_API_KEY="pp_your_gateway_key"
claude
SDK + CLI integrations
Most clients only need a base URL and an API key change. Provider keys can stay on the server, while users continue working from their normal tools.
ANTHROPIC_BASE_URLsecurity model
PromptProxy is intentionally narrow. It is not a general HTTP proxy and it does not try to secretly intercept browser traffic. The goal is to protect known AI workflows in a way security teams can test and explain.
Browser coverage comes from a managed extension and egress controls, not from transparent system-level MITM.
The core detector is local and deterministic. Rules can be reviewed, tested, and tuned without depending on another model.
Vault originals and upstream provider keys are encrypted. Original lookup uses keyed indexes instead of plaintext search.
The MVP runs as a single Go service with SQLite WAL, an embedded admin UI, and a simple background job queue.
deployment
Start small, learn from real usage, then enforce where the risk is clear. The same policy modes used by the gateway also give you a safe rollout path.
Deploy the gateway for a small group. Nothing is redacted yet. Use the findings to tune rules and understand real usage.
pp_ keysEnable redaction for the pilot group, then expand to engineering, security, and ops teams once workflows are stable.
Force-install the managed extension and start blocking categories that should never leave the organization.
Move high-risk teams to strict mode and restrict direct provider egress so the gateway becomes the approved path.
quickstart
pp_ key.export PROMPTPROXY_MASTER_KEY="$(openssl rand -base64 32)"
export PROMPTPROXY_OPENAI_API_KEY="sk-..."
export PROMPTPROXY_ANTHROPIC_API_KEY="sk-ant-..."
go run ./cmd/promptproxy
faq
Not for supported text routes in redact mode. The request is parsed locally, sensitive values are replaced with surrogates, and the sanitized payload is verified before it is forwarded.
No. Non-text content is counted and audited. Admins can block it at runtime when policy requires text-only workflows. Deeper document inspection can be added as a separate ingestion workflow.
Security teams need behavior they can explain and test. The core detector is local, deterministic, and auditable. A model-based detector can be added later as an additional signal, but it should not be the only control.
In managed deployments, Chrome Enterprise or Edge for Business policy can force-install the extension and lock settings. Network egress controls are still needed to reduce bypass from unmanaged browsers or personal devices.
SSE chunks are processed as they arrive. PromptProxy keeps enough trailing data to handle surrogate values that may span chunk boundaries before sending restored output to the client.
No transparent MITM proxy, no general-purpose HTTP forwarding, no hidden LLM classifier, no PostgreSQL or Redis requirement for the MVP, and no silent inspection of arbitrary binary files. The focus is AI data protection for known AI workflows.