Limits, credits and budgets for the software you build Limits, credits and budgets for your software

Decide every costly request before you pay for it.

Your provider bills you per token. Your users pay you per month.

Give each of your users a limit, a budget or credits, like $2 of AI a month. Before each request, your code asks Limitry for a yes or a no, then calls your provider directly. Give each of your users a limit, a budget or credits, like $2 of AI a month.

Start free Read the quickstart

Free for 100,000 checks a month. No card needed.

npm install @limitry/sdk

A $2 AI budget for one of your users

96¢ spent 0¢ held $1.04 left 1 block = 2¢

limitry.reserve({ cost: 54 })

Before your product runs an AI reply that could cost 54¢, your code asks first.

npm install @limitry/sdk

One request, three steps

  1. Ask

    Before the request runs, your code checks with Limitry that there is room. If there isn't, Limitry refuses.

  2. Hold

    Limitry holds the likely cost while your code calls the provider directly.

  3. Charge

    When it finishes, Limitry charges what it really cost and frees the rest. If the request fails, it all goes back.

Your code
const reply = await limitry.reserve(
  {
    subject: { kind: "user", id: user.id },
    action: "ai-call",
    cost: 54,
  },
  async (reservation) => {
    const res = await llm(prompt);
    reservation.cost(priceInCents(res.usage));
    return res;
  },
);
with limitry.reserve(
    subject={"kind": "user", "id": user.id},
    action="ai-call",
    cost=54,
) as reservation:
    res = llm(prompt)
    reservation.cost = price_in_cents(res.usage)

Your prompts and replies never pass through Limitry.

usr_u58sr asks for one more

allowed: false reason.code: "limit_reached"

When a user is over budget, the request never runs, so it costs you nothing.

Works with Stripe, OpenRouter, the Vercel AI SDK, LiteLLM and agent frameworks. See how

Add it to your code with your coding agent

Paste this prompt into Claude Code or Codex. Your agent reads Limitry's skill, reads your code, proposes limits, and creates only the ones you agree to. The limits are for your users, not for the agent itself.

How it works, step by step

Prompt

Read https://limitry.com/docs/skill/SKILL.md and follow it to add Limitry to this codebase. Find the calls that cost us money or that a user could abuse. Propose limits in a table and wait for my answer before creating any.

Rules you would otherwise write yourself

The $2 AI budget is one of them. You describe a limit once, in the app or through the API. Limitry counts every matching check against it. A request runs only if it fits every limit that applies.

See them worked through

Exact even when requests race, retry or can't reach us

A counter you write yourself goes wrong in these three places. Here is what Limitry does in each.

Request A Request B 1 left allowed refused

Two requests, one unit left

Only one of them gets it. Counts stay exact under concurrent requests, and a shared pool is never overspent.

Your code Limitry unreachable fail mode: allow it runs

Your code can't reach Limitry

By default, your code allows the request. A limit can refuse it instead. Either way, your app keeps running.

Request Its retry key k_7f2 key k_7f2 counted once same response

A retried request

With an idempotency key, a retry gets the same response and Limitry counts it only once.

See who is close to their limit

Once Limitry is in your code, your whole team can see the numbers. The Usage page shows who is using each limit right now, what each one has left, and who Limitry refused.

Example data

Know the moment a user hits their limit

Limitry tells your team in the app, by email or on their phone. Each person chooses where.

Notifications in the docs

Example data

Ask Claude or ChatGPT about usage

Product and finance people don't need the app or a developer. They ask their AI agent in their own words, and it answers from Limitry. The agent changes nothing unless a person allows it.

Use Limitry with your AI agent

In Claude, ChatGPT or any AI agent

Start with the free plan

Free for 100,000 checks a month. Paid plans start at $39. A refused check is free, and you need no card to start.

Start free Compare plans Talk to us