How it worksLive demoBlogFAQPricingGitHub
Live demoSimulation · runs in your browser
llmbrake 0.1.0 · real library, fake provider

Watch one customer hit the brake.

Set a monthly budget, then send requests as one customer. Spend climbs, the model switches to a cheaper one at your threshold, and the next request past the cap is blocked with a BudgetExceededError before it reaches the provider.

Simulation

Nothing here calls OpenAI or any other API, and no keys are used. Responses come from a fake OpenAI-compatible provider inside this page that returns randomized, realistic token counts. The budget logic is the real llmbrake 0.1.0 package, bundled for the browser. Costs use its default price table (read 2026-10-09, verify before relying on it).

ControlsCustomer settings
USD / month
Requested model
Downgrade to
Request type

“Send 10” stops early at the first blocked request.

This monthguard.status()
$0.0000of $0.10
80%: cheaper model100%: blocked
Normal
Provider calls0
Blocked (never sent)0
Downgraded calls0
Remaining$0.10
You've hit this month's AI limit. Upgrade for more.Upgrade

Example of what your app could show on BudgetExceededError. Spend can end slightly above the budget: the cap is checked before each call and the cost is recorded after it.

Usage-event logonUsage(event) · newest first
CodeUpdates with your settings
Free · MIT · npm install llmbrake

Try it in your app.

Same library, your real provider and your own store.