Skip to main content

Most flexible
usage billing & limits for AI.

Credits, metering, caps, and custom deals for every user and agent, in one policy that runs in your app and changes live.

npm i @formata/limitr
Run the quickstartStart free

Free and open source in your app. Go live with Limitr Cloud from $49/mo.

Limits that hold

Caps that hold
under load.

Cap any account, feature, model, or agent. Each call holds its room before it runs, so parallel calls can't overspend together.

Margin on every call

Know what every
call earns.

Each call is priced at what you charge and what it costs you, on every model. A call that would lose money stops.

How the engine works →
Charged$1.40
Cost you$0.54
Margin61%
Cost avoided$1.80
customermodeltokenschargedcostmargin
initechlarge120,000stopped · over the org’s cap
globexlarge18,200$0.36$0.2725%
adasmall9,800$0.20$0.02090%
acmemedium42,000$0.84$0.2570%
Example customers and pricesCost and margin →

Change it live

Ship pricing like
a git commit.

A model gets cheaper. A customer signs a deal. Change the policy, test it on real traffic, and it's live on the next call.

Policy · draftChanges
Draft · 2 changesPriya · just now
pro · chat2M tokens→3M tokens
ai_token · price$20 / 1M→$22 / 1M
MessageRaise Pro chat to 3M, reprice tokens to $22
Test · last 30 daysnot run
Replays real calls through the draft before anyone sees it.
LiveDraftRevenue / month$52,400$55,580Margin41%44%Customers paying more—38 of 1,204Hit a new limit—none
v24Every engine gets it on the next call when you publish.api-usapi-euworker
Limitr Cloud · made-up workspace and numbers

Billing, fully managed

Usage lands in a ledger and becomes invoices, paid through your Stripe. Connected out of the box.

Limitr Analyst

Ask what a change will do. It replays it on real usage first.

How it works

One policy.
Yours.

Open source, inside your app, in TypeScript or Python. Edit it as code or in Limitr Cloud, and check each call with allow().

Limitr Cloud · policy editorLive
EntitlementFreeProai_tokenchatexport_pdf
policy.yamltested as written · engine 0.8.7
policy:
credits:
ai_token: { price: { amount: 0.00002 }, overhead_cost: 0.000008 }
plans:
free:
entitlements:
chat: { limit: { credit: ai_token, value: 50000, resets: true } }
pro:
entitlements:
chat: { limit: { credit: ai_token, mode: soft, value: 2000000, resets: true } }
export_pdf: {} # no limit: a feature flag
app.tsengine 0.8.7
const limitr = await Limitr.new(policy, 'yaml');
await limitr.ensureCustomer('acme', 'pro');
await limitr.allow('acme', 'export_pdf'); // true
await limitr.allow('acme', 'chat', 2_100_000); // true, soft limit
// event: meter-overage → bill acme: $2
outputallow('acme', 'export_pdf') → trueallow('acme', 'chat', 2_100_000) → trueevent: meter-overage → bill acme: $2.00

Agentic by design

Built for coding agents.

Limitr ships skills, so your coding agent writes the policy and wires it into your app.

>
/plugin marketplace add dev-formata-io/limitr
>
/plugin install limitr@limitr

Write the policy

Plans, limits, prices, and deals from a plain brief, tested before it ships.

Wire the SDK

allow() at each call, holds around the model, events to your billing.

Build the surfaces

Usage views, plan pickers, and billing settings in your own UI.

Answer the hard questions

Margin per customer, and what a price change would do.

Customer · The Regis Company

A Fortune 500 rollout,
unblocked.

The Regis Company

Fortune 500

Enterprise rollout on a fixed-price contract

100,000+

Users on a single contract

3 modalities

Chat, text-to-speech, and real-time avatars

Read the customer story →

Get started with us

Send us your pricing page.
We'll write the policy.

On one call, we model your plans, credits, and deals in Limitr and show you the margin on each, before you write any code.

Your pricing, as a policy

Plans, credits, limits, and your custom deals, tested in the engine.

The margin on each plan

From your real model and vendor costs, per plan and per customer.

A workspace, ready to go

Set up in Limitr Cloud, then handed to your team to connect Stripe.

Start free. Scale with usage.

Full pricing →

Open source

Free

The engine, forever. Write and test policies in Cloud.

Start free

Pay as you go

$49 /mo

Publish live. Ledger, invoices, Stripe.

Go live

Scale

$499 /mo

Custom deals, contracts, forecasting.

Start on Scale

Enterprise

Let's talk

Usage included, SLA, our team.

Book a demo

Common questions

Before you commit.

It can. Limitr Cloud meters every call, keeps the ledger, and sends the invoices, and your customers pay through Stripe, connected out of the box (or Maxio, Chargebee, ACH, or your own rails).

If you already have billing you like, keep it: send it the engine’s events, and use Limitr for the limits, credits, and margin inside your app.

Put your plans in one policy, then create customers as your app sees them, each on their current plan. Start every limit in observe mode, which records usage and blocks nothing, check it against your current billing, then turn limits on one at a time.

Or book a call and we’ll set it up with you.

You keep your pricing. The policy is a plain document you can keep in your own repo, and the engine that runs it is open source (Apache 2.0). Leave Limitr Cloud and the same policy keeps running on the open-source engine, with the same code in your app. Your configuration and usage records are exportable at any time.

Only usage. Every decision runs inside your app, so requests, prompts, and responses never pass through Limitr. With Limitr Cloud, what syncs is which customer used what, how much, and when, plus any metadata you choose to attach. On its own, the engine sends nothing anywhere.

Enterprise adds a security review and an uptime SLA, and we can put a Data Processing Addendum in place.

A decision takes about a millisecond, in your process, with no network call. Usage syncs to Limitr Cloud in the background.

The engine is free. Limitr Cloud is free to start, $49 a month on pay as you go once you’re live (plus active customers and calls past what’s included), and $499 on Scale for custom deals and contracts. Enterprise usually costs less past about 4,000 active customers. Limitr never takes a share of your revenue.

Make usage profitable.

npm i @formata/limitr