Spending limits
Cap what an agent or a customer can spend each month, and set rate limits on messages.
Your agents run on your own provider key, so every message costs you money. Baseera gives you two controls: a monthly spending limit, and per-minute rate limits.
Set a monthly limit for an agent
Only Owners and Admins can set spending limits.
Open the agent and stay on Overview. Find Monthly spending limit.
Fill in Cost limit per month (USD), Token limit per month, or both. Whichever is reached first counts. Cost is in whole cents, from 0.01 to 1,000,000 dollars. Tokens are from 1,000 to 1,000,000,000,000.
Press Save limit. You see "Limit saved." Leave both fields empty and save to remove the limit ("Limit removed.").
The tile shows used against limit with a percentage, a level of Within the limit, Near the limit or Limit reached, and "Counting restarts on DATE (UTC)."
What happens at the limit
- At 80 percent, each owner gets one email for that limit per month.
- At 100 percent, new turns are refused with the code
limit_reacheduntil the month ends or you raise the limit. Your users see "The assistant has reached its limit for now." and your app'sonErrorgets the code. - Turns already running finish, and so do tool-result continuations of a turn that was let in.
- There is no email at 100 percent. The meter and the refusals are the signal.
Months are calendar months in UTC. Cost is an estimate from list prices. A model with no known price is counted at the highest price Baseera knows, never as free, so a custom model can fill a limit sooner but never later. Token limits do not depend on prices. Eval runs and knowledge embeddings are not counted: only model calls made for end users through an agent.
A limit set in the middle of a month counts what already happened that month. Since a turn's cost is known only afterwards, a few turns that are in flight at the limit can push the total slightly past it, once.
Set a default limit per customer
If your app serves many customers, give each tenant its own monthly limit.
Open Settings from the sidebar and find Default limit per customer.
Set the cost, tokens or both, and press Save limit.
Each tenant of your organization gets this monthly limit across all your assistants. Tenant ids come from your signed user tokens. At the limit, new turns for that tenant are refused with limit_reached, and other tenants are not affected. The meter shows the busiest tenant this month. You get one email a month when the first tenant reaches 80 percent, and it does not name the tenant. A session with no tenant has no tenant limit, but still counts against the agent's.
Rate limits
Rate limits control how fast messages arrive, not how much they cost. Set them on the agent's Assistant page under Rate limits:
| Field | Default | Range |
|---|---|---|
| Per user | 20 messages a minute | 1 to 600 |
| Per agent (all users) | 300 | 1 to 10,000 |
| Per tenant | 100 | 1 to 5,000 |
A rate limit change goes to the draft and applies when you publish. A user over the limit sees "You are sending messages too fast." See Instructions and model.
Pushes to a knowledge base through the API have their own limit of 1,000 items a minute per secret key. Provider key checks are limited to 10 a minute per person and per organization.
See what you are spending
The Assistant page shows Usage (last 7 days) with an Estimated cost, and the Overview shows Cost per session. Both are estimates. Your provider's bill is authoritative. See Analytics and feedback.
What can go wrong
| Message | Cause and fix |
|---|---|
| "Check the numbers: cost in whole cents from $0.01 to $1,000,000, tokens from 1,000 to 1,000,000,000,000." | Fix the values. |
| "Only owners and admins can change spending limits." | Ask an owner or admin. |
| "Sign in with your authenticator code first." | Your organization requires two-factor. Open Security. |
| "The limit is reached. New turns are refused." | Raise the limit, or wait for the month to reset. |
| Users report "The assistant has reached its limit for now." | A limit is full. Check the agent's tile, and the tenant tile in Settings if only one customer is affected. |