How We Cut Our Team’s AI API Bill by 40% Without Switching Tools or Sharing Our Code
Growing team, API costs climbing faster than headcount, and a CTO starting to ask pointed questions. Here's how we cut the bill 40% — without switching tools or sending our code anywhere.
This is the playbook, including the things we tried first that didn't work. If your AI spend is scaling faster than your team, start here.
The situation
We were a growing engineering team leaning hard on AI coding tools. They were worth it — velocity was real. But the API costs were climbing faster than we were hiring, and "it pays for itself" stops being a good enough answer the moment finance pulls the trend line. The CTO's question was fair: why is this going up faster than the team?
What we tried first (and why it didn't work)
- Usage limits. Capping people just moved the work — developers hit the cap and switched to personal API keys, so spend went off-book instead of down.
- Prompting guidelines. A doc nobody reads under deadline. Discipline that depends on memory fails exactly when you're busy.
- Switching models. A cheaper model trimmed the rate but not the waste — we were still sending the same bloated context, just paying slightly less per token for it.
None of it worked because none of it touched the actual cause.
The actual diagnosis
When we finally measured a real session, the waste wasn't in our prompts at all. It was in the tool outputs: the same files read over and over, untruncated Bash dumps, redundant context riding along on every request. We'd been trying to fix the 20% we could see and ignoring the 80% we couldn't.
The fix
We put a local proxy layer between each developer's editor and the model. It strips repeated reads, trims runaway output, and prunes stale context before anything is billed — automatically, so it doesn't depend on anyone remembering a guideline. Crucially, it runs on the developer's machine: no code is ever routed through a third-party service.
The privacy angle was a bonus win
We adopted it to save money. It also quietly solved a problem we'd been dreading:
- Code stays on the developer's machine.
- Nothing gets indexed or retained by a SaaS vendor.
- It passed security review without a vendor questionnaire — because there's no vendor in the data path.
The results
40% cost reduction. Zero workflow change. Legal happy. Same tools, same editors, same developers — we just stopped paying for the overhead. The savings showed up the first week and held.
Start free with 20 optimizations, then scale to the team. Local-first, your keys, your machine — and your code never leaves it.
See team pricing →