Toktra’s budget enforcement system lets you set token spending limits at the organization and department level, block requests the moment a cap is reached, and give users a path to request additional tokens when they need more.Documentation Index
Fetch the complete documentation index at: https://docs.toktra.dev/llms.txt
Use this file to discover all available pages before exploring further.
How budgets work
Budgets are denominated in tokens and reset at the start of each monthly period. Toktra tracks consumption in real time for sub-200ms preflight checks and reconciles against authoritative provider data for reporting. Two enforcement modes are available:| Mode | Behavior |
|---|---|
| Soft cap | Usage above the budget triggers an alert but requests are not blocked. |
| Hard cap | Once the budget is exhausted, outbound LLM requests are blocked by the Chrome extension and the macOS/Windows agents. The block lifts when the period rolls over or an exemption is approved. |
Creating an org-level budget
Click Add Department Budget
To create an org-wide budget, use a department name like
Org or map it to your top-level hierarchy node.Set the monthly token budget
Enter the token allowance. For example, to allow 50 million tokens per month for the entire org, enter
50000000.Choose enforcement mode
Enable Hard Cap to block requests once the budget is exhausted. Leave it unchecked for soft cap (alert only).
Creating a department-level budget
Department budgets let you allocate different token allowances to different teams — for example, 5 million tokens/month for Marketing and 20 million tokens/month for Engineering.Enter the department name
Type the department name, such as
Engineering. If the department does not exist yet, Toktra creates it automatically.Set the token budget
Enter the monthly token allowance. For example, enter
20000000 for a 20 million token/month limit for Engineering.Configure rollover (optional)
Enable Enable Rollover to carry unused tokens into the next month. Set Rollover Cap (%) to limit how much rolls over — for example,
50 means up to 50% of unused tokens carry forward.Hierarchical department budgets
Toktra supports nested department structures. For example:The Chrome extension performs a budget validation in under 200ms before every LLM request using cached hierarchy data. Enforcement is transparent and does not noticeably delay requests.
Budget periods
Toktra resets department budgets monthly. On the first of each month, Toktra automatically calculates and transfers any allowed carryover into the new period’s starting balance.Quarterly budgets can be approximated by setting the monthly budget to one-third of the quarterly target. Native quarterly period support is on the roadmap.
Budget alerts
When consumption crosses configurable thresholds, Toktra sends alerts via email and Slack. Toktra continuously monitors spend against every active budget and triggers alerts when usage crosses the thresholds you define (for example, 70% and 90% consumed). To create a department budget via the API with rollover enabled:Viewing spend vs. budget
The Budget page displays four summary cards:| Card | Description |
|---|---|
| Org Total Budget | Sum of all department token budgets for the current month |
| Org Total Used | Tokens consumed this month across all departments |
| Top Department | The department with the highest token consumption |
| Your Budget | The signed-in user’s remaining personal budget |
Budget exemption requests
When a user needs more tokens than their budget allows — for example, during a sprint requiring intensive AI assistance — they can submit a budget exemption request.Submitting a request
Click Request Exemption
Fill in the user ID, the reason for the request, the number of additional tokens needed, and the budget period.
Approving or denying a request
Admins see a banner at the top of the Exemptions page showing the count of pending requests.Review the request
Locate the pending exemption. Click the green checkmark to Approve or the red X to Deny.
Add reviewer notes (optional)
Enter a note to explain the decision. Notes are visible to the requester.
| Status | Meaning |
|---|---|
| Pending | Awaiting admin review |
| Approved | Additional tokens granted; user’s effective budget is increased for the period |
| Denied | Request rejected; user’s budget remains unchanged |
| Expired | Request was not reviewed before the period ended |
Budget rollover configuration
To enable rollover for a department:- Open or create the department budget.
- Check Enable Rollover.
- Set Rollover Cap (%) — the maximum fraction of unused tokens that carry forward. For example, a department that uses 8M of a 10M monthly budget has 2M unused; with a 50% cap, 1M tokens roll into next month.