Skip to content

zer0pii for developer tools

Documents are shown as written.

zer0pii runs as a sanitizing gateway in front of your LLM provider. Any IDE, CLI or agent that lets you set a custom base URL and an API key can be routed through it without a plugin, a browser extension or any change to the tool itself.

The model in one paragraph

Your tool talks to zer0pii's gateway URL with a zer0pii key. The gateway masks personal data in the request (names, emails, phone numbers, national IDs, card numbers, credentials and more), forwards the masked request to the provider using your provider key, and reconstitutes the reply so the tool sees the original values. The mapping between masked tokens and real values is held in memory for the duration of the request, and every response carries a signed receipt.

IDE / CLI  --(zpii_ key)-->  zer0pii gateway  --(your provider key)-->  OpenAI / Anthropic / Gemini
           <-- reply with original values restored --

What you need

  1. A gateway URL. The hosted gateway is https://api.zer0pii.com/v1. Self-hosted deployments use their own hostname; every guide below writes it as https://<your-gateway>/v1.
  2. A zer0pii gateway key. Sign in to the console, open API keys (/console/keys), click Issue key, and copy it: the plaintext is shown once. Keys start with zpii_ and are sent as Authorization: Bearer zpii_....
  3. Your provider key. Either sent per request in the X-zer0pii-Upstream-Key header, or configured once on the gateway by your admin. When the gateway holds the key, your tool only handles the zer0pii key.

The three routes

All three are served under the same /v1 prefix.

Route Shape Forwards to (default) Provider auth the gateway sends
POST /v1/chat/completions OpenAI Chat Completions https://api.openai.com/v1 Authorization: Bearer <provider key>
POST /v1/messages Anthropic Messages https://api.anthropic.com/v1 x-api-key: <provider key> plus anthropic-version: 2023-06-01
POST /v1/models/{model}:generateContent and :streamGenerateContent Google Gemini https://generativelanguage.googleapis.com/v1beta x-goog-api-key: <provider key>

Streaming works on all three. Tool calls and tool results are masked and restored too.

Optional per-request headers:

  • X-zer0pii-Upstream-URL: send this request to a different provider endpoint (for example an OpenAI-compatible server your team runs). Must be a public hostname; private and internal addresses are refused.
  • X-zer0pii-Conversation-ID: keeps masked tokens stable across the turns of one conversation so the provider's prompt cache keeps hitting. Without it, tokens are stable per organisation.
  • X-zer0pii-Policy-Group: healthcare, clinical, finance or hr switch the request to fail-closed behaviour and, for the clinical groups, date masking.

Embeddings: there is an embeddings route, but masking changes the vectors it returns, so it is not generally enabled. Ask your admin before pointing an embeddings workload at the gateway.

Which of my tools does this cover

The boundary: this path covers a tool only when it lets you set the base URL and give it a key you control. It cannot cover a tool that authenticates with a subscription or OAuth login, because there is no key for the gateway to forward and the tool's traffic does not pass through a URL you choose. Each row below states the vendor documentation it rests on, as of the date shown, so you can check it yourself.

Tool Covered? How Per vendor documentation
Claude Code, API-key mode Yes ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN (see claude-code.md) Claude Code, connect to a gateway, as of 2026-09-22
Claude Code, claude.ai subscription login (Pro / Max / Team seat) No No key to proxy. Setting only ANTHROPIC_BASE_URL keeps the saved login as the active credential and the subscription's terms apply. Hooks cannot rewrite prompts or replies either. Claude Code, gateways and subscriptions, as of 2026-09-22
Continue (VS Code / JetBrains), provider: openai Yes apiBase + apiKey in config.yaml (see continue.md) Continue, OpenAI provider, as of 2026-09-22
Continue, provider: anthropic Partial apiBase is listed as a general model field in the config reference but is not shown in the Anthropic provider page; documented here with that caveat Continue, config reference, as of 2026-09-22
Cursor Not verified Cursor's documentation describes custom API keys (Cursor Settings > Models) but does not document a base URL override, and states custom keys are sent through Cursor's backend. See cursor.md before assuming coverage. Cursor, API keys, as of 2026-09-22
AWS Bedrock or Google Vertex as the upstream Not today The gateway forwards to the public OpenAI, Anthropic and Gemini APIs only. See bedrock-vertex.md. Not applicable
Any OpenAI SDK, Anthropic SDK or Gemini SDK client Yes Set the SDK's base URL to the gateway and its API key to your zpii_ key; pass X-zer0pii-Upstream-Key as a default header or let the gateway hold the provider key Not applicable
Any other IDE or CLI Check Covered if, and only if, it exposes both a base URL setting and an API key setting for the provider format it speaks. If it only offers "sign in", it is not covered. Its own documentation

Guides

What the tool sees, and what it does not

  • The tool receives the reply with real values restored. A masked token only appears in it if the provider echoes one that the reply-side restore cannot match (rare, and visible as a [LABEL_xxxxxxxx] string).
  • The provider receives masked tokens in place of detected personal data, and your provider key. Your zer0pii key is not forwarded to it.
  • zer0pii holds the request in memory for the duration of the call and stores metadata: counts, mode, latency, key prefix and a hash. The console's Audit log shows that metadata (see verify.md).