70% of every AI API dollar
pays for identical work.
Your system prompt, few-shot examples, and context window are the same bytes, same request, same response — billed at full rate every time. CachePilot sits inline and returns cached responses for duplicates.
-H "x-provider-key: sk-your-openai-key" \
-d '{ "model": "gpt-4", "messages": [{"role":"user","content":"hello"}] }'
# Response includes X-CachePilot-Key header — use it for subsequent requests < x-cachepilot-key: sk-cache-22b8ea87-6ae2c11c
Or sign up for a pre-generated key:
No credit card. First 7 days free. Pay 20% of what you save.
// After: duplicates return from cache → $0 provider cost const openai = new OpenAI({ baseURL: "https://cachepilot.koaw.workers.dev/v1", apiKey: "sk-cache-xxx-yyy" });
One line. No SDK. No config.
Change the base URL in your AI client. That's it. Every duplicate request stops costing you.
Route through CachePilot
Change one string — baseURL points to CachePilot instead of the provider. No signup needed — send your provider key as x-provider-key and your CachePilot key is returned in the response header. Your SDK, auth, streaming, and response format stay identical.
Duplicates never reach the provider
Every request is hashed and checked against our cache stack (L0 memory → L1 edge cache → L1.5 normalizer → L3 prompt optimization). On hit: response returns in <1ms, $0 provider cost.
You only pay for unique requests
We track what you would have paid the provider vs. what you actually paid. Our fee is 20% of the difference. If you save nothing, you pay nothing — not a cent.
Why 70% is the floor, not the ceiling
Real-world AI apps repeat the same requests far more often than developers realize.
System prompts dominate
Most production apps attach the same system prompt (instructions, tone guardrails, output schema) to every request. That's 500–2000 tokens of identical text — billed as fresh input each time.
Background jobs repeat
Batch processing, data enrichment, nightly summaries — these hit the exact same prompt thousands of times. With no cache, every run is a full-price API call. With CachePilot, 100% of duplicates cost $0.
Multi-tenant sharing
If ten users ask the same question, caching returns the same answer immediately — and only the first request ever hits the provider. For SaaS apps, this alone can cut costs by 60–90%.
Prompt caching gaps
Provider prompt caching helps on multi-turn conversations, but doesn't cover exact duplicate requests across users, sessions, or time. That's the gap CachePilot fills — and where most of the waste lives.
The cache stack
Five layers, from nanoseconds to seconds, designed to maximize hit rate.
L0 — In-memory
Hot responses held in process memory with LRU eviction and 30-second TTL. Nanosecond lookup for the most frequent duplicates.
L1 — Edge cache
Cloudflare Cache API stores full responses at the edge. Shared across regions, tenant-isolated by hashed API key. Millisecond lookup, one-hour TTL.
L1.5 — Normalizer
Deterministic cache key generation that's blind to whitespace, key ordering, and formatting differences. "Hello" and " hello " produce the same cache key.
L3 — Provider optimization
Anthropic prompt caching markers injected automatically on session boundaries. Reduces re-processing of conversation history by up to 90%.
Tenant isolation
Every cache key is prefixed with a SHA-256 hash of the customer's API key. Your users' data never leaks across tenants. Passthrough mode available for sensitive requests.
Session-aware
Multi-turn conversations are detected automatically. Message history is hashed and compared — no raw content stored. Continuations get provider-level prompt caching for the stable prefix.
Pricing that matches your savings
No subscription. No minimum. You pay only when the cache saves you money.
Save $100 → you pay $20. Save $1,000 → you pay $200.
Save $0 → you pay $0. Forever.
- Only pay on what you save
- First week free for all new signups
- No subscription or minimum spend
- Cancel anytime, keep your API key
- Transparent per-request cost breakdown
FAQ
Questions developers ask before changing their base URL.
Do I need to sign up first?▼
x-provider-key header — no CachePilot key needed. We auto-create an account and return your sk-cache-xxx key in the X-CachePilot-Key response header. Use that key (without x-provider-key) for subsequent requests. You can also sign up with your email above for a pre-generated key.What happens during the 7-day trial?▼
Do I have to change any code?▼
baseURL in your OpenAI/Anthropic client with https://cachepilot.koaw.workers.dev/v1. Your SDK, authentication, streaming, and response format all stay exactly the same. Change it back anytime — there's no lock-in.What if my app has no duplicate requests?▼
How is savings calculated?▼
Which providers and models are supported?▼
x-provider-key header. We never handle provider authentication.Are my prompts stored or logged?▼
x-cachepilot-mode: passthrough and the request bypasses all caching entirely.