Guide · Comparison
Spend limits, proxies, or BillCurfew: which one actually stops the bill?
Three kinds of tool promise to stop a surprise OpenAI, Anthropic or OpenRouter bill. They work at different layers, act at different times, and fail in different ways. This page is about the trade-offs, not a sales pitch, and that includes the places where BillCurfew is the weaker choice.
Published
The short version
| Provider spend limits | Proxy / gateway (LiteLLM, Portkey, Helicone, OpenRouter key limits) | BillCurfew | |
|---|---|---|---|
| Where it lives | Inside the provider's billing | In the request path | Outside the request path, reading admin APIs |
| When it acts | When the provider's tracked spend hits the limit | Before or at each request | On its next poll, about every 5 minutes |
| Usual period | Monthly (OpenAI, Anthropic); per-key daily/weekly/monthly on OpenRouter | Whatever you configure | A daily dollar cap per key, plus a spike rule |
| Sees prompts | Provider only | Yes, the traffic goes through it | No |
| Code or base-URL change | No | Yes | No |
| Can turn off a key the provider issued | You do it by hand | Usually no; it blocks its own virtual key | Yes. A manual kill works on every plan, including Free. Auto-kill is paid-only and off until you turn it on. OpenAI delete is permanent; Anthropic and OpenRouter disables are reversible. |
| Cost | Included | Free to paid; some budget features are plan-gated | Free for 1 key; paid from $19/mo. Solo, Team, and Agency each include a 14-day trial. |
Option 1: provider spend limits
OpenAI
OpenAI has monthly spend limits for an organization and for each project. Turn on Enforce a hard limit and affected requests return 429 with organization_spend_limit_exceeded or project_spend_limit_exceeded. Spend alerts only notify; they don't stop traffic. OpenAI says enforcement "is not instantaneous, so recorded spend can slightly exceed the configured amount." [1]
Anthropic
Your organization's usage tier comes with a monthly spend cap. You can set your own lower limit on the Billing page, and a monthly limit per workspace on the Workspaces page. The Default Workspace can't have a limit. [2][3]
OpenRouter
Each key can have a USD credit limit with limit_reset set to daily, weekly, monthly or none. Once a key uses its limit, its requests are rejected until the limit resets or you raise it. [4][5]
Strengths: free, enforced by the provider, nothing to install.
Weaknesses: OpenAI and Anthropic limits are monthly and cover a project or workspace, not one key. Monthly limits cap the damage, but they don't tell you that a normally quiet key is suddenly busy.
Option 2: proxies and gateways
A gateway sits between your code and the provider, so it can check a budget before each request.
- LiteLLM (self-hosted proxy): virtual keys take a
max_budgetand an optionalbudget_duration. After a key crosses its budget, requests fail. [6] The finer setup, including whether those budgets depend on the proxy's own database, is worth confirming in LiteLLM's docs before you plan around it. - Portkey (hosted gateway): budget limits by cost or by tokens, with weekly or monthly resets. The docs say they're available on the Enterprise plan and to select Pro customers. [7]
- Helicone: adds cost tracking and rate limiting on traffic that goes through it. That description comes from a third-party write-up, not from Helicone's own docs, so confirm it before you rely on it.
- OpenRouter: is itself a gateway, which is why its per-key limits (Option 1) can block requests.
Strengths: a gateway is the only option here that can stop the very next request. It also gives you logs and routing.
Weaknesses: you have to change code or the base URL, your prompts go through a third party, there's one more thing in production that can fail, and it can't revoke a key the provider issued directly if someone uses that key outside the proxy (a leaked key, for example).
Option 3: BillCurfew
BillCurfew reads per-key usage through each provider's admin API (an OpenAI organization admin key, an Anthropic Admin API key, or an OpenRouter management key) and stays out of your request path.
- A daily dollar cap per key, plus a spike rule: if spend over M minutes jumps past N times the recent baseline, the rule fires.
- Alerts by email on every plan, plus a Slack webhook on paid plans.
- A manual kill on every plan, including Free. You confirm it in the product. OpenAI deletion is permanent. Anthropic and OpenRouter disables are reversible.
- Optional auto-kill on paid plans only, and it stays off until you turn it on. The same provider actions apply: OpenAI delete is permanent; Anthropic and OpenRouter disables are reversible.
- No prompts, completions or tool arguments are stored.
Where BillCurfew is weaker. Read this part.
- It polls; it doesn't check each request. In BillCurfew's own words, "A loop can spend for up to one poll interval before we notice." A gateway can refuse the next call; BillCurfew can't. [9]
- Some dollar figures are estimates. Anthropic's usage report returns tokens, not dollars, so BillCurfew prices them from Anthropic's published list. The OpenAI daily cap uses OpenAI's own costs endpoint when it has a figure.
- Anthropic needs an organization account. The Admin API isn't available to individual accounts. [8]
- It doesn't replace provider limits. Use it as a second clock alongside them.
Where BillCurfew is stronger
- No proxy, SDK change or base-URL change. Setup is pasting an admin key.
- It watches the keys the provider actually issued, so it still sees spend that bypasses a gateway, such as a leaked key being used somewhere else.
- It can turn that real key off. By hand, that works on Free. Automatically, only on a paid plan, and only after you opt in.
Which should you use?
- Always: set provider limits. They're free.
- If you already run a gateway and every call goes through it, use its budgets for per-request enforcement.
- If you won't put a proxy in front of production agents, or keys live in tools you don't control, add BillCurfew for per-key daily caps, spike alerts, and a kill switch. The manual kill is on every plan, including Free. Auto-kill is the paid option.
- Many teams use two of the three. They cover different failure modes.
Start free with one key, no card. Free is $0 for 1 provider and 1 key, with email alerts and a manual kill. Solo is $19/mo, Team $49/mo and Agency $149/mo, each with a 14-day trial. Slack and auto-kill start on those paid plans.
FAQ
Does a provider spend limit stop the next request?
Only after the provider's tracked spend reaches the limit. OpenAI says enforcement is not instantaneous and can slightly overshoot. [1]
Can a proxy stop a leaked key?
Only if the leaked key is the proxy's own virtual key. A leaked key the provider issued, used directly against the provider, bypasses the proxy.
Is BillCurfew real-time?
No. It acts on its next poll, about every five minutes, so a loop can spend for up to one poll interval first. [9]
Does BillCurfew see my prompts?
No. It reads usage and dollar figures through admin APIs and stores no prompts or completions.
Do I need BillCurfew if I use OpenRouter key limits?
Not necessarily. BillCurfew adds a spike alert before the limit hard-stops the agent, and it covers OpenAI and Anthropic keys too.
Sources
- OpenAI, Spend limits. https://developers.openai.com/api/docs/guides/spend-limits [1]
- Anthropic, Rate limits (spend limits section). https://platform.claude.com/docs/en/api/rate-limits [2]
- Anthropic, Workspaces. https://platform.claude.com/docs/en/manage-claude/workspaces [3]
- OpenRouter, API Authentication. https://openrouter.ai/docs/api_reference/authentication [4]
- OpenRouter, Update an API key. https://openrouter.ai/docs/api/api-reference/api-keys/update-an-api-key [5]
- LiteLLM, Budgets and Rate Limits. https://docs.litellm.ai/docs/proxy/users [6]
- Portkey, Budget Limits (docs source). https://github.com/Portkey-AI/docs-core/blob/main/product/ai-gateway/virtual-keys/budget-limits.mdx [7]
- Anthropic, Admin API. https://platform.claude.com/docs/en/manage-claude/admin-api [8]
- BillCurfew, Security. billcurfew.com/security [9]