Never wake up to a surprise $1,000 OpenAI bill again.
SpendCap sits between your code and OpenAI. Every proxy key carries a hard monthly cap enforced at the edge — so an infinite loop at 3am trips a breaker and pings your phone, instead of draining your card.
One line changes. Nothing else does.
Same SDK, same models, same response shape. Point baseURL at SpendCap and swap the key.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
});import OpenAI from "openai";
const client = new OpenAI({
apiKey: "tg_live_…",
baseURL: "https://proxy.spendcap.dev/v1",
});Isolated proxy keys
Issue a tg_live_ key per client, per project, per intern. Your real provider key never leaves SpendCap.
Hard circuit breaker
Set $50 and it means $50. The key stops serving the moment it hits the cap — not at the end of the billing cycle.
Sub-2ms overhead
One Redis lookup at the Cloudflare edge decides every request. Your latency budget stays yours.
Telegram the instant it trips
The breaker fires from the edge, so the alert reaches your phone before the next request even fails.
Per-key attribution
Daily spend, token counts and model mix broken out by key, so you know which client is actually expensive.
Streaming, fully metered
SSE passes through unbuffered while usage is counted on a teed copy. Streamed tokens cost the same as any other.
Pricing
Tracked volume is the spend flowing through the proxy — not what you pay us.
Free
Prove it works on one project.
- $50/mo tracked volume
- 2 proxy keys
- 30-day usage history
- Email budget alerts
Indie
For the solo dev shipping real traffic.
or ₹999/mo billed in INR
- $500/mo tracked volume
- Unlimited proxy keys
- Instant Telegram alerts
- Per-key rate limits
- Account-wide spend ceiling
Agency
One key per client, one bill you control.
or ₹2,999/mo billed in INR
- $3,000/mo tracked volume
- Per-client key isolation
- Automated PDF reports
- Priority support
- Everything in Indie