Billing
Every request is split into four token classes: input, output, cached, and thinking. Each class has its own per-provider rate; the four-way split lets you see exactly which class is driving spend on the usage page. This page covers the four classes, the per-team budgets, and the thinking-budget report that surfaces per-team thinking spend with a per-model-tier breakdown.
Token classes
- Input tokens are the prompt tokens billed by the provider.
- Output tokens are the model's response tokens.
- Cached tokens are input tokens that hit the gateway's semantic cache; they are recorded for visibility but contribute zero cost.
- Thinking tokens are the reasoning tokens emitted by Anthropic's thinking-mode and OpenAI's o-series models. They are billed at the thinking rate, which can be ten to a hundred times the output rate.
Budgets
Per-team daily_budget_usd and monthly_budget_usd settings hard-cap
spend. Once the cap is hit the gateway returns 429 until the bucket
resets at midnight UTC. Per-key daily_budget_usd overrides the team
budget when set tighter.
Thinking-budget report
The thinking class is the key FinOps lever. A complex request to a
thinking model can spend ten to a hundred times the output-token cost
of an equivalent non-thinking request. The thinking-budget report
surfaces the per-team and per-complexity-tier aggregate so an admin
can spot which team's complex traffic is driving the bulk of monthly
spend.
The report groups spend by (team_id, complexity_tier) where
complexity_tier is one of simple, medium, or complex.
Endpoint
GET /admin/billing/thinking-report
?org_id=<uuid>
&period_start=2026-04-01
&period_end=2026-04-30
Authorization: Bearer <session token>
Requires owner or admin role. Cross-org probes return 404.
A sample response:
{
"org_id": "org_5d9f...",
"period_start": "2026-04-01",
"period_end": "2026-04-30",
"total_tokens": 18470000,
"total_cost_usd": 924.50,
"by_team": [
{
"team_id": "team_a1b2...",
"team_name": "Research",
"total_tokens": 14820000,
"total_cost_usd": 741.00,
"by_tier": [
{"tier": "simple", "tokens": 320000, "cost_usd": 16.00},
{"tier": "medium", "tokens": 4500000, "cost_usd": 225.00},
{"tier": "complex", "tokens": 10000000, "cost_usd": 500.00}
]
},
{
"team_id": "team_c3d4...",
"team_name": "Support",
"total_tokens": 3650000,
"total_cost_usd": 183.50,
"by_tier": [
{"tier": "simple", "tokens": 2400000, "cost_usd": 60.00},
{"tier": "medium", "tokens": 1250000, "cost_usd": 123.50}
]
}
]
}
Dashboard
The Settings → Billing pane carries a thinking-budget report tile
rendered as a stacked bar chart. Each bar is one team; the bar
segments are the three tier buckets (simple, medium, complex).
Hovering a segment shows per-team-per-tier token count and dollar
cost.