Local PII masking proxy for AI prompts

Real intelligence. Masked identities.

maskyr runs deterministic regex rules, validators (Luhn, IBAN mod-97, SSN, entropy), context cues, heuristic name and address detection, and a local name gazetteer on your machine to replace names, accounts, and identifiers before prompts leave localhost. Fylume's specialised local detection model is currently in development and not yet integrated (optional external loopback model hooks are off by default).

Listens on http://127.0.0.1:8787 with OpenAI-compatible POST /v1/chat/completions (GET /v1/models, GET /healthz). Anthropic and Gemini route via /v1/chat/completions; native /v1/messages, /v1/responses, and /v1/embeddings return HTTP 501.

Prompt masking in transit

Step through a scenario or type your own text to inspect what leaves localhost and how replies restore locally.

Simulation

Client-side browser simulation: runs illustrative JS scenarios locally in this page without starting the gateway, opening maskyr.vault, or invoking an AI model.

Stage: 0 Ready
Local boundary 127.0.0.1:8787
Prompt input Raw text
Restored local output Simulated local restore
maskyr proxy
Idle
Via POST 127.0.0.1:8787/v1/chat/completions Upstream POST /v1/messages adapter
Outbound API request Surrogates only

            
External model reply Upstream response

Reversible substitution map

4 entities mapped
Original (local) Surrogate (outbound) Entity kind State

Four-step masking pipeline

Every request passes through local entity detection, encrypted vault lookup, residual outbound scanning, and local reply restoration.

Local host (127.0.0.1:8787) 1. App prompt John Martin 2. Rules + heuristics maskyr.vault map 4. Restore reply Jacob -> John Residual outbound scan (onResidual: block) before egress External provider 3. Claude / GPT / Gemini Sees: Jacob Bechara Never sees: John Martin maskyr translates upstream
Step 01

Intercept the request

Your SDK sends OpenAI-compatible POST /v1/chat/completions traffic to 127.0.0.1:8787 instead of calling upstream endpoints directly.

Step 02

Detect and substitute

Deterministic regex rules, validators (Luhn, IBAN mod-97, SSN, entropy), context cues, heuristics, and a name gazetteer locate entities, assign surrogates, and persist mappings in maskyr.vault.

Step 03

Forward to the provider

maskyr re-scans the masked JSON payload for residual leaks, then translates and forwards surrogate text to OpenAI, Anthropic, or Gemini.

Step 04

Restore the response

Streaming and non-streaming completions pass back through local process memory so surrogates resolve to original values.

What maskyr handles

Deterministic validators, regex rules, context cues, heuristics, and a local name gazetteer detect structured identifiers alongside names and organisations (Fylume's specialised model is in development).

Detects context-dependent entities

Combines regex rules, validators (Luhn, IBAN mod-97, SSN, entropy), context cues, heuristic name/address detection, and a local name gazetteer across people, companies, emails, IBANs, and street addresses; secret tokens block egress by default (action: 'block') and optional loopback model hooks are off by default.

"Escalation for John Martin at Veldhuis Logistics Ltd, business ID 2026-0419"
person org email iban secret (blocks) address

Preserves grammatical agreement

Replaces entities with format-matching surrogates and shifted dates of birth so upstream reasoning and formatting stay coherent.

person: John Martin -> Jacob Bechara
email: john.martin@veldhuis-freight.example -> jacob.bechara@surrogate.invalid
iban: CH93 0076 2011 6238 5295 7 -> CH41 0092 ...

Maintains multi-turn consistency

Deterministic vault scopes via x-maskyr-scope keep surrogate assignments stable across follow-up turns and allowlisted tool-call arguments.

x-maskyr-scope: escalation-419
scope: conversation (30d retention)

Reverses substitutions locally

Persists original-to-surrogate pairs encrypted in maskyr.vault on disk while matching active mappings and multi-token aliases in local process memory before replies reach your application.

Aliases tracked for John Martin: John Martin, John, Martin -> restored locally in streaming SSE and JSON responses.

Ways to run maskyr

Point OpenAI-compatible SDKs at http://127.0.0.1:8787 or wrap command-line workflows from your terminal.

  • Local HTTP proxy Serves OpenAI-compatible POST /v1/chat/completions, GET /v1/models, and GET /healthz on http://127.0.0.1:8787 with optional x-maskyr-scope headers.
  • OpenAI, Anthropic, and Gemini upstream Access OpenAI, Anthropic, and Gemini models via POST /v1/chat/completions (maskyr translates upstream). Native /v1/messages, /v1/responses, and /v1/embeddings return HTTP 501.
  • Local Ollama fallback Configure local.baseUrl for Ollama or llama.cpp when policy routes sensitive kinds locally.
  • Configurable entity policies Switch between balanced, strict, and permissive presets with mask, block, allow, or local actions (secrets block by default).

Local and external boundaries

Active mappings persist encrypted in $MASKYR_HOME/maskyr.vault (0600 AES-256-GCM) while active lookups run in local process memory; remote AI endpoints only process deterministic surrogates.

Inside your local boundary

  • Raw prompt text Original names, account numbers, and attachments enter on 127.0.0.1:8787.
  • Deterministic rules, heuristics, and gazetteer Validators (Luhn, IBAN mod-97, SSN, entropy), context cues, heuristics, and a name gazetteer filter by policy.minConfidence; optional external loopback model hooks (off by default via policy.modelDetection) bypass minConfidence when configured.
  • Encrypted maskyr.vault store Persists deterministic surrogate maps encrypted in $MASKYR_HOME/maskyr.vault (0600 AES-256-GCM) while active lookups run in local process memory.
  • Residual outbound scan (onResidual: block) Re-checks substituted payloads and blocks requests if unmasked spans remain.
  • Restored application output Replaces surrogates with originals before returning JSON or SSE chunks.

External model boundary

  • Surrogate-substituted JSON payload Outbound bodies contain format-preserving surrogates such as Jacob Bechara.
  • Provider API credentials Loaded from environment variables or vault config per upstream provider.
  • Upstream model completion Claude, GPT, or Gemini generates responses using surrogates only.
Fylume

Fylume detection model (in development)

Fylume's specialised local span-recognition model is currently in development and is not yet integrated into this release. Today, maskyr detects entities locally using deterministic regex rules, validators (Luhn, IBAN mod-97, SSN, entropy), context cues, heuristic name and address detection, and a local name gazetteer, with optional external loopback model hooks off by default behind policy.modelDetection. Engineering teams should review active entity policies, allowlists, and attachment rules against their own threat model prior to deployment.

Visit Fylume