Modbot Docs
AI

Limits and spend

What AI costs by feature, the month-end estimate, money limits for everyone, a feature, a role or one person, a monthly allowance for each team member, and model prices.

Every AI feature in Modbot sends paid requests to your provider. Settings → AI → Limits shows what each feature has cost, estimates the month's bill, and lets you set money limits so no feature, and nobody using Chat, can run it past what you are willing to pay. It also sets how much AI each team member may use in a month.

The page needs the Change settings permission, including its list of top chat users.

Features

Spend is counted and limited per feature:

FeatureWhat counts
ModerationAI topic checks, including Try it with AI topics (AutoMod)
InsightsScheduled insights and Generate now (insights)
ChatEvery step of every Chat reply, and every AI brief (Chat)
Connection testThe Test button on Connection (AI settings)

How spend is counted

AI providers charge by tokens: small pieces of text, roughly three quarters of a word each in English. Input tokens are what is sent to the model, output tokens are what it writes back, and cached input tokens are input the provider has seen recently and charges less for.

After each request, Modbot records the tokens your provider says it used (input, cached input and output), the model, the feature, and for Chat, Generate now and Test, the person who asked. It turns tokens into money when it shows or checks spend:

  1. OpenRouter's own cost. When your provider is OpenRouter, Modbot asks OpenRouter what each request cost and uses that figure exactly.
  2. A price you entered for the model, on the price list below. It always wins over a fetched price.
  3. A price fetched from OpenRouter's public model list.
  4. No price. The cost is unknown, never zero.

Because prices are applied when spend is read, a price you enter today also prices what that model used earlier.

Unknown spend is shown as Unknown, or beside a known amount as, for example, "$1.20 + unknown". Hover over a figure to see its input, cached and output tokens and how many have no price.

Unknown spend cannot reach a limit

A model with no price has no cost Modbot can compare with a money limit, so its use is never stopped by one. Make sure every model you use has a price. Check the Price from column for No price. A team member's monthly allowance in tokens is the one limit that stops a model with no price, because tokens are counted for every model.

If your AI server does not report token counts at all (some local servers do not), Modbot has nothing to record, and limits cannot stop it either.

Days, weeks and months are counted in UTC. A week starts on Monday.

Spend by feature

The Spend by feature card has one row per feature and a Total row, with columns Today, This week, This month, Last month and Month-end estimate. Each shows money with the token count underneath.

The Daily spend card is a chart of the last 30 days, one colour per feature, stacked. It shows Part unknown when some of those days include spend with no price.

The month-end estimate

The estimate is deliberately simple, so you can check it by hand:

estimate = spent so far this month
         + (spent over the 7 whole days before today ÷ 7) × days left in the month after today

The seven days can reach back into last month, which is what makes the estimate usable on the first of the month. If some of that spend has no price, the estimate says so.

Spend limits

A limit is an amount in US dollars per day, per month, or both. You can set limits for:

Applies toCompared withStops
EveryoneEvery feature's spend added togetherEvery feature
A feature (Moderation, Insights, Chat or Connection test)That feature's spendThat feature
A roleEach person with that role, separately: their own Chat spendChat, for that person
A userThat person's own Chat spendChat, for that person

A role limit is not a shared pot. A $2 daily limit on the Moderator role lets each moderator spend $2 a day on Chat.

Role and user limits only apply to Chat, because Chat is the one feature a person uses over and over. AI briefs count as Chat, so those limits stop them too. They do not apply to Generate now or Test, even though those also record who pressed them.

Adding a limit

Choose what it applies to

In the Spend limits card, open Add a limit for… and pick Everyone, a feature (under Features), a role (under Chat · roles) or a user (under Chat · users). Press Add.

Enter the amounts

Fill in Per day (USD), Per month (USD), or both. Leave a box empty for no limit in that period. Amounts must be zero or more.

Save

Press Save. The whole list is saved at once: a row you removed with Remove is gone once you save.

Each thing can only have one limit row. For each row the card also shows Spent today, Spent this month and the Month-end estimate, with how far through the limit each one is (for example "45%"). Role rows show Each member instead, because each member is compared separately.

A limit of 0 stops the feature (or the person) completely.

How a limit stops a request

  • Modbot checks limits before each request, never during one. A request that starts just under a limit can finish a little over it; the next one is refused. Your provider is not called for a refused request.
  • When several limits apply, the tightest one stops it.
  • A limit resets at the start of the next UTC day or month.

What happens when a limit is reached:

FeatureWhat happens
ChatNew replies are refused with a sentence naming the limit. A reply already under way finishes.
ModerationAI topics stop and the reason is shown in Try it. Term lists keep working.
InsightsScheduled insights are skipped (not written late). Generate now shows the sentence.
Connection testTest shows the sentence instead of calling the provider.

The sentences name the limit:

  • "Your daily AI spend limit is reached." (a user limit)
  • "The Moderator role's monthly AI spend limit is reached." (a role limit)
  • "The monthly AI spend limit for Chat is reached." (a feature limit)
  • "This Modbot's daily AI spend limit is reached." (the limit for everyone)

The first time each limit stops a request in its day or month, Modbot records AI spend limit reached in the audit log, once per limit per period. It is an operational entry, so seeing it needs See the operational log.

Monthly AI allowance per team member

The Monthly AI allowance per team member card sets how much AI each person on your team may use in a month. Unlike a user or role limit it counts every feature the person uses: Chat, Try it and the test set buttons in AutoMod, asking the AI about a flag, Generate now on insights and the Test button.

An allowance is measured two ways, and either or both can be set:

MeasureUnit shownWorks for
Tokens per monthtokens (the small pieces of text the model reads and writes, described above)Every model, including a local one or one with no price
US dollars per monthUSDModels with a price. A model with no price has no known cost, so it never reaches a dollar allowance.

Leave a box empty for no limit of that kind. An allowance of 0 means that person may use no AI this month.

The first row, Everyone, is the default: what each team member gets unless they have an amount of their own. In each member's row, Allowance is Default or Own amount. With Own amount the boxes in that row replace the default completely, so an own amount with both boxes empty means no limit for that person. Press Save to keep the changes; each save that changes anything is recorded in the audit log as a settings change, with what it was and what it became.

Each row also shows Used this month, in tokens and in money, and Of the allowance, how far through each measure that person is (for example "45% of tokens").

When a member has used their allowance, the next thing they ask AI for is refused with a plain sentence, and nothing is sent to your provider:

  • "You have used your monthly AI allowance (200,000 tokens). It starts again on 1 October."
  • "You have used your monthly AI allowance ($5.00). It starts again on 1 October."

A reply already under way finishes, and a member can go a little over when several requests are running at the moment they reach it: the check happens before each request, not during it. Allowances start again with the month, in UTC. The first time one is reached in a month, Modbot records AI spend limit reached in the audit log, as it does for any limit. A call refused this way is in the call log as Limited, under that person's name.

What counts against an allowance. What a signed-in account asked for. Work no account asked for counts against nobody's allowance: insights on a schedule, the sentence on an alert, and AutoMod's own checks of Discord messages and VRChat profiles. That work still counts towards the limit for everyone and its feature's limit above, which stop it as before.

Who is not stopped. People with Administrator, and people whose role has Use AI in excess of usage limits, are never stopped by an allowance. Their use is still counted and shown, with Not limited in place of a share.

Use AI in excess of usage limits

The Use AI in excess of usage limits permission (roles and permissions) takes away the limits on a person and on their roles, and their monthly allowance, so they are not stopped by a user or role limit in Chat or by the allowance.

The limit for everyone and the feature limits still apply to them. Those are your ceiling on the bill and each feature's share of it; no permission spends past them.

People with Administrator are treated the same way: user and role limits and the allowance never stop them, but the limit for everyone and feature limits do.

Use AI in excess of usage limits is not part of the built-in Moderator or Viewer roles.

Token limits from earlier versions

Earlier versions of Modbot could have a monthly token limit on Moderation or Insights, from before Modbot knew prices. If your deployment has one, it appears in the Spend limits card as, for example, Moderation · tokens, and can only be removed.

Modbot changes each one into a monthly money limit for that feature as soon as the feature's model has a price, working out the amount from the mix of tokens that feature has used. If the feature already has a lower monthly money limit, the lower one is kept. Until then the token limit keeps counting and stops the feature with "The monthly AI token limit for Moderation is reached." (or Insights).

Top chat users this month

The Top chat users this month card lists the ten accounts that spent most on Chat this month, with what they spent and how many tokens they used. It helps decide whether a user or role limit is needed.

Prices

The Prices per million tokens card lists every model in use: the models set on Connection, Chat and Insights, every model that has been used, and any model you have priced.

ColumnMeaning
ModelThe model name exactly as it is sent to your provider.
Input (USD)Price per million input tokens.
Cached input (USD)Price per million cached input tokens. Left empty, cached input costs the same as input.
Output (USD)Price per million output tokens.
Price fromEntered (your price), OpenRouter with how long ago it was fetched, or No price.

The boxes hold prices you entered. When a box is empty, the fetched price shows faintly as its placeholder.

  • To enter a price, type the input and output prices (both are needed) and press Save.
  • To go back to the fetched price, press Clear on that row and Save.
  • To price a model not listed, type its name in the Model box under the table (it suggests models that have been used), press Add, fill in the prices and Save.

Like limits, the whole price list is saved at once.

Fetched prices

Fetch prices downloads OpenRouter's public list of model prices straight away. It needs no key. The card shows when prices were last fetched, or Not fetched.

Modbot also fetches automatically once a day, but only while AI is on and the provider on Connection is OpenRouter. A deployment using any other provider, or a local model, never contacts OpenRouter unless someone presses Fetch prices. If an automatic fetch fails, Modbot tries again an hour later; if OpenRouter says it is receiving too many requests, Modbot waits a day.

Model names must match exactly

A fetched price is used only when the model name matches OpenRouter's name for it exactly. OpenRouter names models with the company in front (for example openai/... or anthropic/...). If you use a provider directly and its model names are written differently, the fetched prices will not match: enter prices for those models by hand.

Warnings on the Health page

The Health page shows an AI spend card when a limit for everyone or for a feature:

  • has reached 80% of its amount,
  • has a month-end estimate over its monthly amount, or
  • is reached.

Each line shows what was spent, the limit, the percentage and, for a monthly limit, the estimate. The card is amber while close and red once a limit is reached. User and role limits are not listed there. Seeing the Health page needs See the operational log. See Checking a deployment.

Modbot is not endorsed by or affiliated with VRChat Inc. or Discord Inc. VRChat is a trademark of VRChat Inc. Discord is a trademark of Discord Inc. SteamVR is a trademark of Valve Corporation. Windows is a trademark of Microsoft Corporation. Docker is a trademark of Docker, Inc. PostgreSQL is a trademark of the PostgreSQL Community Association of Canada. Railway is a trademark of Railway Corp. Other names are trademarks of their respective owners; see Legal. Modbot and its logo are trademarks of the Modbot project. Open source under AGPL-3.0.

On this page