Skip to content

Cost Management

Cost Management keeps consumption-based AI spend predictable. SecondStack tracks usage down to the individual request and enforces budgets at multiple levels, so overages are caught before they become invoices — the safety net that makes pay-for-what-you-use pricing workable at scale.

Full transcript lightly edited for readability

Introduction (00:00). Hello and welcome to the SecondStack tutorial. In this video I want to show you how to manage your budget using the Budget and Spend page in Control Tower.

What is Control Tower? (00:13). Control Tower is the application where you can manage your SecondStack account. You can manage some services, API keys, notifications, and so on. And you can manage your budget and spend as well.

Reaching the budget limit (00:51). Let’s start with a simple example. Sometimes, if you’re using the Chat App a lot, or you’re using API keys or Agent Claude or any SecondStack service where you can spend some tokens, you might run out of your allocated budget. So when it happens, you will probably see a notification like this one. So we get an error message, and it says: you have exceeded your currently configured Chat App usage budget, and please go to the Control Tower Budget and Spend to review and adjust allocation of available budget. So let’s do that. Click on the button.

Checking your current allocation (01:25). Now we are in the Control Tower application, on the Budget and Spend page. On this page you can see your total available budget and how it is distributed between different SecondStack services. Let’s look at this block first. This is your shared pool of credits. You can decide how much of it should be available for Chat App usage, or Agent Claude in my case, or any API keys if you have some. In my case, I have already used all the budget allocated to the Chat App here, and that’s why I just can’t continue using the Chat App. But as you can see, I still have available credits here. I spent only about half of my budget, and it means that now I can reconfigure my budget to continue using the Chat App.

Redistributing credits (02:36). Because now we can see that I didn’t use almost half of the budget for Agent Claude. It means that I can reduce the amount allocated for Agent Claude. And let’s do this. We can decrease the budget here, for example, like this. And I also want to leave some space for using Agent Claude. And let’s increase the budget for regular models in the Chat App like this. And let’s save it.

Confirming the Chat App works (03:20). Once I apply the changes, the new allocation becomes available, and I can go back to the Chat App application and try to continue using it. Let’s try to send a message. And we get the answer. As you can see, the model answered successfully. I think that we can continue using the Chat App now, and everything works well.

When your total budget is used (03:49). And that’s basically all you should know about getting this kind of error message. So again, if you get a notification like this, the first thing you should check is the Budget and Spend page. And if you used all credits from your budget, you still have an option. You can also request a budget increase by contacting a team supervisor or an LLMOps platform support administrator. Or just contact someone who can increase your budget and can solve this problem for you. Okay, and that’s it for this video. Now you know how to check your budget using the Budget and Spend page in Control Tower. I’m Andrew from SecondStack. Thank you for watching, and see you in the next tutorial. Bye.

Total Platform Spend $798 / $1,200
Remaining: $402
Engineering $642 / $1,000
Chat App $380
API Keys $64
Marketing $156 / $200
78% of budget used
Chat App $32
API Keys $112
d.kowalski
Chat App — Standard Spend: $312 · Budget: $450
Chat App — Agent Mode Spend: $47 · Budget: $180
API Keys
VSCode Spend: $142 · Budget: $200
local-testr-rag-agent Spend: $89 · Budget: $150
Remaining unallocated budget $460
Ranked by total spend this period
a.chen
$268
j.martinez
$251
d.kowalski
$189
r.patel
$176
s.nakamura
$162
l.dubois
$148
m.oconnor
$97
k.berg
$82
n.volkov
$64
p.santos
$51
e.wright
$38

Budgets roll up across the platform, per team, and per user, with a breakdown by key.

Budgets can be set and enforced for:

  • Per user — each person’s total consumption.
  • Per team — a department or group’s shared allowance, with per-member limits.
  • Per API key — each virtual API key, so a single integration cannot drain the whole budget.

Enforcement happens in the SecondGate gateway at request time. When a request would exceed any applicable budget, it is blocked rather than billed — the limit is a hard stop, not just a report.

Users allocate their own budget across SecondChat, SecondAgent, and any custom API keys, keeping an explicit unallocated reserve. This lets people manage their own consumption without an admin in the loop, while hard limits keep the total safe.

Configurable threshold alerts warn before a budget is exhausted. When spend crosses a set percentage of a budget (for example, 70%), the platform notifies the user through an in-app banner, a browser notification, and email. Alerts are de-duplicated within each budget period so a single threshold does not generate repeated noise.

ControlTower surfaces usage analytics over the gateway’s spend logs and SecondChat’s request logs:

  • KPI cards for total requests, total spend, latency, and error rate, with period-over-period comparison.
  • Usage over time, broken down by user, team, or model.
  • Top users and model mix.
  • Request-level logs — model, user, token counts, duration, and status per call.

Analytics are scoped by role: administrators see the whole deployment, team supervisors see their teams, and users see their own consumption on the User Dashboard.