Skip to main content

Rolter records the cost of every request it serves, attributes it to the key, project, team, business unit and customer behind it, and can stop traffic at a budget. This guide sets that up in the order that makes the numbers trustworthy.

Note

Budgets and rate limits keep their counters in Redis, so the limits hold across every gateway replica. Without Redis they fail open: requests pass and spend is not counted. Cost reporting itself comes from the request logs in ClickHouse.

Price every model that costs money

A model with no price row is logged at a cost of zero, which is indistinguishable from free. Add prices under Models → Model Prices (or [[model_prices]] in the config file), in any currency your rate table knows. See Budgets & rate limits.

Find what is still unpriced

Observability → Dashboard shows how much of the window’s traffic was unpriced, and LLM Logs flags each such row, so a partial total is never read as a final one. Price what shows up, or decide per budget whether unpriced traffic counts as zero or is refused.

Attribute spend to the people you bill

Create business units and name the customers you serve under Governance → Business Units and Governance → Customers, then point each virtual key at a unit and a customer. Every request the key serves is recorded against both, and the same screens roll the spend up. See Cost attribution.

Set the limits

Models → Budgets & Limits at the org, team, project, key, business unit or customer:

  • a budget caps spend over a day, a month or for good; the next request past it gets HTTP 402, and nothing reaches the upstream;
  • a rate limit caps requests and tokens per minute; past it, HTTP 429 with Retry-After.

The most restrictive limit on a request’s chain wins. To change a budget, replace it: spend so far is counted per scope, so the new budget starts from what was already spent.

Get alerted on runaway spend

Alerting → Alert Rules with the spend_velocity metric sends a webhook when spend per hour crosses the line you set, alongside error-rate and latency rules.

Give finance access without the prompts#

Make your finance team viewers of the org. A viewer sees the Dashboard, every request-log row of the org — model, tokens, cost, status, attribution — and every budget and limit, and can change none of them. The captured request and response bodies are shown only to the members and admins of each project, unless a project admin chooses to open them to its viewers. See RBAC.