A drop-in proxy that cuts what you pay Anthropic. Your first $15 of savings are free — no card, no trial clock.
curl -fsSL https://contextifyai.com/install.sh | bash
Requires Node.js 22 or newer.
The installer never uses sudo and never writes outside its own directory. --dry-run prints exactly what it will do and exits. It hooks into Claude Code so /contextify shows your savings, and it backs up anything it touches.
Aggregated from anonymous counters reported by running proxies. No prompts, no API keys, no IP addresses — six numbers and a random instance ID.
Point your SDK's base URL at Contextify. Everything else stays exactly the same — same request shape, same response shape, same streaming.
Places cache_control breakpoints across the four available
slots, budget-aware and gated on each model's own cacheable minimum.
Cache reads bill at a tenth of the input rate.
Fire the same request from twenty workers at once and Anthropic sees one. Without this you pay twenty times for one answer.
5 concurrent → 1 upstream callA repeated request never reaches Anthropic at all, so it costs nothing and returns in milliseconds. Isolated per credential, so one tenant never receives another tenant’s answer.
3,708 ms → 2 msOne changing line near the top of a prompt quietly makes everything after it uncacheable. It is the most common reason a caching setup saves nothing, and it is invisible in a diff. Contextify finds and fixes it.
meaning preservedDrag to your current monthly Anthropic spend.
Assumes a 70% savings rate and $240/year of self-hosted infrastructure
(one small VM plus Redis), and Contextify credit at 10% of measured savings.
Savings are workload-dependent — they come from repetition,
so traffic with a unique prefix on every request will see far less.
Measure your own with GET /v1/metrics/savings before you
budget against a number.
Live runs against api.anthropic.com with claude-opus-5,
five-turn conversations, a ~3,100-token system prompt and heavy tool definitions.
| Metric | Result |
|---|---|
| Savings rate, from the API's own usage counters | 72–85% |
| Prompt cache hit ratio | 72–82% |
| Proxy overhead, p50 | 1.5–4.5 ms |
| Proxy overhead, p99 | 5.7–15 ms |
| Upstream time-to-first-token, for scale | 836 ms |
| Coalescing, 5 concurrent identical requests | 1 upstream call |
| Edge-cache replay | 3,708 ms → 2 ms |
Overhead scales with payload size, so it is a range rather than one figure. An earlier lightly-loaded run measured 0.29 ms p50; that is not representative and is not the headline. Turn 1 of any conversation shows a negative saving — a cache write bills at 1.25× and pays back from turn 2 onward.
It reads your project, edits files, and runs commands — asking you first. Free to use, with no card and no limit. You bring your own Anthropic API key and pay Anthropic directly for the tokens.
contextify code
Included with Contextify. Set ANTHROPIC_API_KEY, or run
contextify code --key to store one. Your key stays on your
machine and is sent only to Anthropic.
Every file is snapshotted the instant before it changes. Approving an
edit decides whether it happens; /undo decides whether it
stays. It puts back the whole turn — every file, in one step.
What this session has spent, what it would have cost without caching, and the cache hit rate — in dollars, as you work. Contextify is already on the wire, so the numbers are measured rather than guessed.
/budget 5 and the session stops at five dollars. An agent
that can loop is an agent that can spend; this is the ceiling that
makes leaving one running a decision rather than a gamble.
Type @src/ and Tab completes the path; the file arrives
with your first message. No round trip spent fetching, and no chance of
the model opening the wrong thing.
Saved after every turn, so a crash or a closed lid costs nothing. Reopening is also the cheapest thing the proxy does: the restored history is a cache hit, billed at a tenth of the input rate.
Credential files are refused outright, and any live key found inside an ordinary file — or printed by a command — is stripped before it can enter the transcript. What is never sent cannot leak.
A terminal obeys the text written to it, so a command could redraw itself as something harmless. Ours can’t: what the prompt shows is byte-for-byte what runs.
Opens and searches files, makes focused edits, and runs your builds and tests. Nothing is written or run until you say yes, and it only ever touches the directory you started it in.
Routes through your local Contextify proxy, so the same session costs less. Without it, requests go straight to Anthropic and everything still works.
What it is, plainly. Contextify Code is our own coding
agent. It is not Claude Code, not a replacement for it, and not affiliated
with Anthropic — it is a smaller tool built around the things we
think matter most: knowing what you are spending, and being able to take it
back. Two limits worth stating up front. /undo covers files
the agent edited, not files changed by a command you approved — if it
runs your migration script, undo cannot unrun it. And the cost figures are
Anthropic’s published rates applied to the token counts Anthropic
returns; they are an accurate account of this session, not a substitute for
your invoice.
Everything above cuts the bill. These are the controls a finance team, a security review and an on-call rotation ask for. If credit or a licence lapses, each one steps aside quietly — nothing stops proxying.
Per-credential budgets by hour, day or month. Soft threshold warns in
response headers; the hard limit refuses with a Retry-After.
In-flight reservations bound how far concurrent requests can overshoot
— the failure this exists for is a retry loop quietly spending five
figures overnight.
Every request hash-chained to the one before it. Edit, delete or reorder any record and verification reports the exact index where the chain breaks. Records who, when, which model, tokens and cost — never prompts or completions, because a second copy of your most sensitive data is how an audit log becomes the breach.
FEATURE_AUDIT_LOG
Card numbers, bank details, national IDs and API keys are detected and validated before anything leaves your network, so an order number is not mistaken for a credit card. Values become typed placeholders, so
the model still reasons about the problem. Ships in
report mode so you can measure the false-positive rate on
your own traffic before enforcing anything.
Route short prompts to a cheaper model by policy; fail over on 429 and 5xx with exponentially-backed-off, fully-jittered retries. Never retries a 400 — a malformed request is malformed everywhere. Never reroutes tool-using calls unless you opt in.
FEATURE_MODEL_ROUTINGRole policy derived from your gateway's auth headers, with per-tenant Prometheus series and cost attribution for chargeback. Cache isolation is not part of this — it is a security control, and is included at every tier.
FEATURE_MULTITENANT · FEATURE_PROMETHEUSRemoves retrieval chunks that overlap in meaning, not just ones that match byte for byte — the common case when a RAG pipeline pulls several passages covering the same ground.
FEATURE_SEMANTIC_DEDUPYou are charged a share of what Contextify actually saves you. If it saves nothing, it costs nothing.
/contextifySavings are measured from Anthropic's own reported usage, not estimated, and every statement itemises them so you can check the figure against your own Anthropic invoice. If your credit runs out, Contextify keeps passing requests through untouched — it stops saving you money, it never stops working.
No card, no trial clock. Contextify runs at full strength and you keep every dollar it saves until the free allowance is used up.
Prepaid, from $25. Credit is drawn down at 10% of what we actually save you — so $100 of credit covers $1,000 of savings. Larger top-ups draw at a lower rate.
Measured from Anthropic's own reported usage, not estimated. A month where Contextify saves you nothing costs you nothing. There is no seat fee and no monthly minimum.
If your credit reaches zero, Contextify keeps passing every request through to Anthropic untouched. It stops saving you money; it never stops working, and it never holds your traffic hostage.
An example. You spend $8,000 a month with Anthropic. Contextify saves you 74% of it — $5,920. You are charged 10% of that saving, $592, drawn from prepaid credit. You are $5,328 better off, and the first $15 of it was free.
Savings depend entirely on how repetitive your traffic is. Stable system prompts, long conversations and retrieval-heavy workloads save the most; traffic with a unique prefix on every request saves little. Your statement itemises every charge against Anthropic's own usage figures, so you can check it against your own invoice from them. If Contextify will not save you much, we would rather tell you before you pay us.
Tell us your current monthly Anthropic spend and roughly what your traffic looks like — how repetitive the prompts are, whether you use retrieval, how long conversations run. That determines what Contextify can actually save you, and therefore what it should cost. If the answer is “not much”, we would rather say so.