Private sessions for the API, agents and MCP
Private sessions (a.k.a. “unlinkable inference”) are enabled by default in the Obscurify.ai web chat and Android app. For the API, you have to opt in (by default, the API uses your regular API key). Here’s how to enable private sessions for all the different ways of using the API (Claude Code, Codex, pi, OpenAI/Anthropic SDKs, curl, MCP clients etc.)
Private sessions have a different payment mechanism: each conversation is paid for by a ‘prepaid session’ (with a random secret) purchased with a wallet of blind-signed vouchers stored on your machine (your API key is not sent with your chat). We can verify that each session was paid for, but we can’t link it to an account or to other conversations. (See Unlinkable inference for details.)
We’ve written a small local proxy (open source: https://github.com/Obscurify-ai/unlinkable-inference) called unlinkable-inference that does this for you.
Before you start
- Sign up for Obscurify.ai and add some balance (you’ll find your API key on the account page).
- Install Rust on your machine (e.g. with
curl https://sh.rustup.rs -sSf | sh) - this is needed in order to install the proxy.
1. Install the proxy
cargo install unlinkable-inference-cli
This should install a single command: unlinkable-inference. You can get help with unlinkable-inference --help.
2. Point your tools at it
Any OpenAI or Anthropic client (the API)
First, start the proxy (and leave it running):
export OBSCURIFY_API_KEY=sk-obs1_... # your API key goes here
unlinkable-inference serve # starts up the proxy at http://127.0.0.1:8899
Continue using the AI tools you already use. Just change the base URL to point to the proxy (and leave the API key the same).
OpenAI SDKs, curl, Aider, OpenCode, and other similar tools: use http://127.0.0.1:8899/v1 as the base URL.
Anthropic SDKs and Claude Code: use http://127.0.0.1:8899 as the base URL.
For example, here is a curl request to the OpenAI-compatible API of the local proxy:
curl http://127.0.0.1:8899/v1/chat/completions \
-H "Authorization: Bearer $OBSCURIFY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"model": "deepseek/deepseek-v4.1-flash", "messages": [{"role": "user", "content": "Say hi"}]}'
The proxy will only use your API key to transfer money from your account to your wallet. If you are a Casual or Pro subscriber, it will also use your API key to fetch this month’s passes for the models included in your subscription. Chat requests will never include your API key. They are relayed from the proxy to the server with a session secret. A new session secret is generated for each conversation. You pay for the tokens you use.
Claude Code, as an MCP server
You can use the proxy with Claude Code by adding it as an MCP server (it doesn’t have any tools, it simply runs the proxy while you have Claude Code running):
claude mcp add unlinkable-inference -e OBSCURIFY_API_KEY=sk-obs1_... -- unlinkable-inference mcp
Then, have Claude Code get its key from the proxy: edit ~/.claude/settings.json
{
"apiKeyHelper": "unlinkable-inference key",
"env": {
"ANTHROPIC_BASE_URL": "https://obscurify.ai",
"ANTHROPIC_MODEL": "deepseek/deepseek-v4.1-flash"
}
}
Claude Code will continue to talk to obscurify.ai directly, but with a different key (a session secret). A session is valid until Claude Code is idle for 5 minutes. The proxy tops the session up when it runs low.
Codex
Since Codex doesn’t have a key helper, you’ll need to go through the proxy. Add the proxy as an MCP server (so Codex starts it) and a provider to ~/.codex/config.toml:
[mcp_servers.unlinkable-inference]
command = "unlinkable-inference"
args = ["mcp"]
env = { OBSCURIFY_API_KEY = "sk-obs1_..." }
[model_providers.obscurify-private]
name = "Obscurify (private)"
base_url = "http://127.0.0.1:8899/v1"
env_key = "OBSCURIFY_API_KEY"
Then make a profile next to it, ~/.codex/private.config.toml:
model_provider = "obscurify-private"
model = "deepseek/deepseek-v4.1-flash"
Start Codex with codex --profile private (with OBSCURIFY_API_KEY set in your shell).
The Obscurify MCP server
With our MCP server (@obscurify/mcp), you can give any MCP client tools to query our models for answers and second opinions. Set OBSCURIFY_PRIVATE=1 in the environment and it will do this via private sessions (starting the proxy if needed):
{
"mcpServers": {
"obscurify": {
"command": "npx",
"args": ["-y", "@obscurify/mcp"],
"env": { "OBSCURIFY_API_KEY": "sk-obs1_...", "OBSCURIFY_PRIVATE": "1" }
}
}
}
pi
Copy integrations/pi/unlinkable-inference.ts from the repository to ~/.pi/agent/extensions/. This will start the proxy automatically when pi starts and add an obscurify-private provider to your list of providers (which has the same models as your obscurify provider). You can select this as your provider using the /model command within pi. Your normal provider will still be available.
3. Check it works
Open http://127.0.0.1:8899/_unlinkable in your browser. It will show you your wallet, your open sessions and what our server received with each request (a session secret, never your key!).
Good to know
- We can see your IP address (you can run the proxy behind Tor or a VPN if you want, it supports the
HTTPS_PROXYandALL_PROXYenvironment variables). - Don’t lose your wallet (in
~/.local/share/unlinkable-inference/)! Even better, start the proxy with environment variableOBSCURIFY_ACCOUNT_NUMBERequal to your account number, and the wallet will automatically be seeded from your account number (only a key derived from the number is sent to us), so it is possible to rebuild it on any machine. - You can get a response of up to 32,000 tokens in a private session (a bit less for the most expensive models).
- Your plan’s models work in private sessions too (frontier models on Casual, uncensored models on Pro): the proxy automatically gets anonymous passes for your plan every month.
- It doesn’t cost you anything extra to use the proxy: you pay for the tokens in each conversation, and whatever is left in the session is returned to your wallet as “change”.
Tested
We ran all of this against obscurify.ai on 2026-11-15. Curl, the OpenAI API and the Anthropic API went through unlinkable-inference serve 0.1.0. So did Claude Code 2.1 (with the apiKeyHelper), Codex CLI 0.169 (--profile private), our MCP server 0.3.0 with OBSCURIFY_PRIVATE=1, and pi, where we also tried a Pro uncensored model. Each time, all our server got was a session secret. It never saw the API key.