Skip to content

Pools, balances and budgets

Everything in Limitry is a limit. Three common needs are limits used a particular way.

Define a limit on the shared subject — say 10,000 AI calls a month for each team — and name the team on each user’s check:

{
"subject": { "kind": "user", "id": "u_7" },
"shared": [{ "kind": "team", "id": "t_42" }],
"action": "ai-call"
}

The check must fit every limit on the user and on the team, and charges all of them — or none. However many of the team’s users check at once, the pool is never overspent. Name up to 4 shared subjects (a team, its org, a project…).

Balances — prepaid credits that never reset

Section titled “Balances — prepaid credits that never reset”

Choose the window total (a balance): the amount is the starting balance and it never resets. Top a subject’s balance up when they buy credits:

Terminal window
curl -X POST https://api.limitry.com/v1/limits/$LIMIT_ID/grants \
-H "Authorization: Bearer $LIMITRY_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "subject": { "kind": "team", "id": "t_42" }, "amount": 5000, "note": "October top-up" }'

or in the app: Settings → Limits → Credits on the balance. Every grant is kept (GET /v1/limits/{id}/grants). When a balance is used up, the check’s retryAfterSeconds is null — waiting won’t help; credits will. Owners and admins add credits; an agent can ask, and a person approves (limit.grant).

A budget is a limit in money. Count in cents, on the agent, for every action:

Field Value
Subject agent (every, or one id)
Action *
Unit cents
Amount 5000 — $50
Window day (or total for once)

Each check passes the call’s price as cost. When the cost isn’t known up front, reserve an estimate and commit what it actually cost. The agent stops at its budget — every check after that is a “no” until the window resets (or, for a balance, until you add more).