Skip to content
Salyro
Operate

Usage & costs

How usage is measured and cost is calculated from it, which breakdowns exist, and how the figure relates to a provider's invoice.

Knowing what AI traffic costs, and being able to say where the cost came from, is one of the main reasons to put a gateway in front of your providers at all. This page describes how the figure is produced, so that you can explain it to somebody else and be confident in the answer.

What is measured

Every request contributes:

  • Requests — how many were made
  • Input tokens — what was sent, counted separately
  • Output tokens — what came back, counted separately
  • Errors — how many requests failed
  • Latency — how long they took

Input and output are kept apart because they are priced apart. A single "tokens" figure would be a number you could not derive a cost from.

How cost is calculated

Cost is computed from token counts against an internal price catalogue, per model and per provider, with input and output priced separately. It is calculated on Salyro's side while the usage event is being processed, not in your client and not at display time.

The catalogue keeps prices over time rather than only the current ones. This matters more than it sounds: it means the cost recorded for a request made last month does not change when a provider adjusts its rates this month. A historical figure stays what it was.

The breakdowns you get

Usage can be read by:

  • Gateway — which slice of your traffic
  • Model — which model within it
  • Provider — which provider account is being spent against
  • Time — a simple trend, so a change is visible as a change

The gateway breakdown is the one that carries the most weight, because it is the one you control the meaning of. Cost per feature, per customer or per environment is not a separate capability — it is what the gateway breakdown becomes when you have split your gateways along that line. That decision is made before the traffic runs: see Attribute cost per feature or customer.

How this relates to your provider's invoice

Salyro measures your consumption and prices it from a catalogue. Your provider bills you, against your own provider account, at its own rates.

They are two independent calculations of the same traffic, so expect them to agree closely rather than to match to the cent — and when precision matters, reconcile against the provider. Salyro's figure is what tells you where the spend came from; the provider's is what you pay.

Salyro does not bill you for model usage, does not sit between you and your provider's billing, and does not receive that invoice.

What is not enforced

The one control that does apply is the rate limit attached to each API key — see API keys. It caps how fast requests are made rather than how much they cost, so it bounds the rate at which a misbehaving process can spend, not the total.