CachePilot – Drop-in AI API caching proxy (pay 20% of savings)

koaw_moi1 pts0 comments

CachePilot — Eliminate duplicate AI API costs

● Infrastructure — one line change

70% of every AI API dollar

pays for identical work.

Your system prompt. Your few-shot examples. Your context window. Same bytes, same request, same response — charged at full rate every time. CachePilot sits inline, returns cached responses for exact duplicates, and forwards only unique requests to the provider.

Get API Key →

First week free. No credit card. Pay 20% of what you save.

cachepilot — proxy log

$ cachepilot proxy started — 3 active connections

─── Request log ───

✔ HIT gpt-4o $0.0000 0.3ms

✔ HIT claude-sonnet $0.0000 0.4ms

→ MISS gpt-4o $0.0023 1.2s cached

✔ HIT gpt-4o-mini $0.0000 0.2ms

✔ HIT claude-sonnet $0.0000 0.3ms

→ MISS gpt-4o $0.0023 1.1s cached

✔ HIT gpt-4o $0.0000 0.3ms

Saved today: $0.00<br>Your fee: $0.00<br>Cache rate: 71%

0%

duplicate rate (measured)

0ms

cache hit latency

cache layers

0%

our fee on savings

One line. No SDK. No config.

Change the base URL in your AI client. Every duplicate request stops costing you.

OpenAI client

Before<br>After

// Before: every request pays full provider price, duplicates included

const openai = new OpenAI({

apiKey: "sk-..."

});

// After: duplicates return from cache → $0 provider cost

const openai = new OpenAI({

baseURL: "https://olympic-veterinary-bathroom-viewpicture.trycloudflare.com/v1",

apiKey: "sk-cache-xxx-yyy"

});

Works with OpenAI, Anthropic, and OpenRouter — bring your own API key.

How the overhead is removed

You add the proxy. It finds and eliminates the duplicates. You pay for what's left.

Route through proxy

Change one string: baseURL points to CachePilot instead of the provider. Your code, SDK, and response format stay identical.

Duplicates never reach the provider

Each request is hashed and checked against our cache layers (L0 memory → L1 Redis → L1.5 normalizer → L3 prompt optimization). On hit: response returns in

You only pay for unique requests

We track what you would have paid the provider vs. what you paid through us. Our fee is 20% of that difference. No savings? No fee.

First 7 days free

No charge for any savings during your trial week. Cancel anytime.

Pricing: 20% of savings

A fraction of the overhead we eliminate. No subscription. No minimum.

20%

of calculated savings

$0 if you save $0

First 7 days free

Cancel anytime

Save $100/mo → pay $20

Save $1,000/mo → pay $200

Save $10,000/mo → pay $2,000

Your cost breakdown, in real time

Every request logged: what it would have cost, what it cost through us, and your accrued fee.

Recent requests

Open full dashboard →

Model<br>Cache<br>Savings<br>Fee

claude-sonnet-4HIT$0.0045$0.0009<br>gpt-4oHIT$0.0023$0.0005<br>claude-sonnet-4MISS$0.0000$0.0000<br>gpt-4o-miniHIT$0.0002$0.0000

FAQ

How does the free week work?

For the first 7 days after signup, your fee is waived on all savings. At the end of the trial, you're charged 20% of whatever you saved going forward. If you saved $0 during the trial, no charge applies after it either.

Do I have to change any code?

One line: replace baseURL with https://olympic-veterinary-bathroom-viewpicture.trycloudflare.com/v1. Same SDK, same authentication, same response format. Streaming works.

What if my app has no duplicate requests?

Then you pay $0 forever. We calculate savings per-request: baseline (what the provider would have charged) minus actual (what you paid through us). If every request is unique, you save nothing and owe nothing. Most apps have significant repetition — system prompts, few-shot collections, background batch jobs.

How is savings calculated?

We track each request at provider pricing (model, input tokens, output tokens). Cache hit = $0 provider cost. Cache miss = provider cost passed through. Savings = baseline − actual. Our fee = 20% of cumulative savings.

Which providers are supported?

OpenAI (GPT-4o, GPT-4, o1, o3), Anthropic (Claude Sonnet, Haiku), and any model on OpenRouter. You keep your own provider API keys — we never handle provider auth end-to-end.

Are my prompts stored?

No. We store SHA-256 hashes of message sequences for session detection — never raw content. Cache keys are tenant-isolated by customer. Send x-cachepilot-mode: passthrough to bypass caching entirely for sensitive requests.

savings provider cache request cachepilot openai

Related Articles