v0.3.0, Apache-2.0
Outworld
Outworld is an open-source gateway for the OpenAI and Anthropic APIs. It replaces names, emails, phone numbers, addresses and dates with stand-ins before a request is sent to a cloud model, and restores the originals in the response.
go install github.com/davidparkercodes/outworld/cmd/outworld@latest What it does
You send
Draft a reply to John Smith ([email protected]) confirming our call on March 15, 2024. My verification code is 482913.
The provider sees
Draft a reply to Kasimir Sandoval ([email protected]) confirming our call on December 25, 2024. My verification code is [redacted code].
You get back
A draft addressed to John Smith about March 15, 2024. The verification code was never sent and is not restored.
Setup
Outworld speaks both the OpenAI Chat Completions API and the Anthropic Messages API. Anything that lets you set a base URL works: Claude Code, the OpenAI and Anthropic SDKs, LiteLLM, Open WebUI, and local servers like Ollama, llama.cpp and vLLM.
Claude Code
export ANTHROPIC_BASE_URL=http://127.0.0.1:8787
claude Any OpenAI-compatible client
base_url = "http://127.0.0.1:8787/v1" Features
Realistic stand-ins, not placeholders
John Smith becomes Kasimir Sandoval, not <PERSON_1>. Emails stay valid, phones keep their format, addresses keep their shape. The model can still reason about the text.
The answer comes back translated
Stand-ins and shifted dates are restored in the response, including streamed chunks and tool-call arguments. You read the real names. The provider never did.
Your policy, per entity type
Keep, mask, shift, generalize or strip each kind of value. Your employer may be public. Your kid's school is not. You decide.
Fails closed
Every outbound payload is re-scanned. Anything it recognizes but cannot transform blocks the request with a 422 that never echoes the value.
Route by sensitivity
Send each request masked to the cloud, raw to a local model, to a confidential-compute endpoint you trust, or nowhere at all.
One identity per person, encrypted
An AES-256-GCM vault keeps every stand-in stable across requests and whole corpora. Marcus, Marc and Delaney stay one person to the model.
Also
- No model required. Patterns and a built-in name detector run in milliseconds.
- Optional NER sidecars (GLiNER, OpenAI Privacy Filter) for extra recall.
- Byte-stable transcripts, so provider prompt caching keeps working.
- Dry-run any request to see exactly what would be sent, and why.
- Logs carry routes, counts and timings. Never real values or prompts.
- One static Go binary, a distroless Docker image, and a Go library.
Who it is for
Coding agents
Claude Code reads your repo, your logs and your notes. Point ANTHROPIC_BASE_URL at Outworld and the names in TODOs, branches, git trailers and home paths are masked before they leave.
Assistants over personal data
Email, notes, contacts and records. Add a dictionary of the people you actually talk about and Outworld recognizes them, their nicknames and their handles.
Pipelines and batch jobs
outworld mask and outworld unmask work on stdin with the same vault and policy. Mask a corpus, send it anywhere, translate the results back.
Measured accuracy
Every number comes from a blind corpus of 131 hand-written documents, about 43,000 words with 4,208 labelled values, written without access to the detector code. Nothing was tuned against it. Measured on version 0.3.0 with a dictionary and no model.
Outworld removes most of what identifies people in ordinary prompts. It does not remove all of it. See every number and what drives it
Limits
- Not anonymization. A rare job title plus a small town can still identify someone with every name replaced.
- Not a content filter. Your medical question is still a medical question. Route that kind of request to a local model, or block it.
- Not a secret scanner. It strips the credentials it recognizes, and about a third of unlabelled secrets still get through.
Install
go install github.com/davidparkercodes/outworld/cmd/outworld@latest
export OUTWORLD_VAULT_KEY=$(outworld keygen)
outworld serve --config outworld.yaml