Set token limits

Cap how many AI tokens each device can use per day, week or month, and warn users before they hit the cap.

DM
Danish Mir
Written By Danish MirLast updated 6 days ago

A Token Limit rule caps how many tokens a device can use in a period. Use it to control AI spend per team, runtime or model.

New to policies? Start with Policies overview.

Add a token limit

  1. Go to Security → Policies and open a policy, or click Create Policy.
  2. Click Add rule and choose Token Limit.
  3. Fill in the fields below and click Add rule.
  4. Click Save, then Deploy.
Token Limit rule

Fields

Field

What it does

Enforcement

Block refuses requests over the limit. Warn lets the user continue or cancel. Watch only logs it.

Period

Daily, Weekly or Monthly.

Token Limit

The number of tokens allowed in the period. Must be greater than 0.

Runtime

Where the limit applies: Any, Chromium, IDE, CLI / Terminal or Desktop App.

Provider and Model

Limit one provider or model, or leave both as Any. To block a model outright, use Restrict AI models instead.

How limits are counted

Token limits always count per device, whatever the policy scope. A 100,000 tokens/day limit scoped to a group gives every device in that group its own 100,000 tokens a day.

Warn first, then block

You can add two limits for the same runtime, provider, model and period: one that warns and one that blocks. For example:

  • Warn at 50,000 tokens/day
  • Block at 60,000 tokens/day

The warning limit must be lower than the blocking limit. A warning at or above the block would never fire, so Alesia rejects it.

When limits overlap

If several limits cover the same device, the one with the lowest daily rate wins. A monthly limit is compared by its daily average, so 200,000 tokens/month (about 6,667 a day) beats 10,000 tokens/day. A more specific scope wins first: Client, then User, then Group, then Organization. See When policies overlap for the full rules.

Need help?

Contact support@getalesia.com.

Was this helpful?

Your feedback shapes what we write next.