allowed: falsereason: "limit_exceeded"resetsAt: "2026-11-01T00:00:00Z"
Over the budget, your code never makes the call, so it costs you nothing.
Every AI reply, export or API call your product makes costs you money. Give each of your users, teams, API keys or agents an allowance, like a $2 AI budget a month or 60 requests a minute. Your code asks Limitry before each one runs, and gets a yes or a no.
const reply = await limitry.hold(
{
subject: { kind: "user", id: user.id },
action: "ai-call",
estimate: 4,
},
async (held) => {
const res = await llm(prompt);
held.cost(priceInCents(res.usage));
return res;
},
);with limitry.hold(
subject={"kind": "user", "id": user.id},
action="ai-call",
estimate=4,
) as held:
res = llm(prompt)
held.cost(price_in_cents(res.usage))usr_u58sr asks for one moreallowed: falsereason: "limit_exceeded"resetsAt: "2026-11-01T00:00:00Z"
Over the budget, your code never makes the call, so it costs you nothing.
A counter in your database works until two requests arrive at once, or the counter's server is down, or a client retries a request. Limitry handles exactly these cases.
Only one of them gets it. Counts stay exact under concurrent requests, and a shared pool is never overspent.
Each limit says what your code should do: allow the request (the default) or refuse it. Our outage doesn't have to be yours.
Send an idempotency key and a retry gets the same answer without being counted twice.
Hold an estimate before your product's AI reply and settle the tokens it actually used. If the reply fails, Limitry gives the hold back.
Most teams start with one of these, and each covers part of the job. Limitry sits beside your billing and your providers, and decides whether each request may happen.
| If you use | The gap | With Limitry |
|---|---|---|
| A counter in your database | Concurrent requests overspend, retries count twice, and an outage blocks everyone. | Exact under concurrency, each request counted once, with a fail mode per limit. |
| A rate limiter, such as Upstash or Cloudflare | Counts requests in a window. It has no plans, credits or shared team budgets. | Plan allowances, prepaid credits and budgets over any period. |
| An LLM gateway, such as LiteLLM or OpenRouter | Covers model calls, and every request passes through it. | Any action you choose. Your code calls your providers directly and only asks Limitry. |
| Usage billing, such as Stripe meters | Counts after the money is spent. | Decides before the cost is paid. Billing stays where it is. |
You describe a limit once, in the app or through the API. Limitry counts every matching check against it, and allows a request only if it fits every limit that applies.
| What you want | In Limitry |
|---|---|
| A $2 AI budget a month for each of your free users | A monthly budget on ai-call, counted in cents |
| Credit packs a whole team spends from | A balance on the team that never resets, topped up by your payment webhook |
| 60 requests in any minute for each key to your API | A rolling limit on api-request |
| $5 a day for each of your AI agents, across every tool | A daily budget on the agent |
| At most 3 exports running per workspace | A concurrency limit |
Give Claude Code or Codex Limitry's tools and paste a prompt like this one. It reads your code, proposes limits, and creates only the ones you agree to.
Add Limitry to this codebase. Find the calls that cost us money or that a user could abuse (LLM calls, paid APIs, emails, exports). Propose limits in a table: subject, action, amount, window, fail mode. Wait for my answer before creating any.Free up to 100,000 allowed checks a month; paid plans from $39. Denied checks never count. No card needed.
We read every message. Compare the plans