Usage and spend

Usage and spend

Interpret estimated tokens, provider-reported usage, configurable pricing, and request attribution.

Last updated July 10, 2026

Token estimates

Before dispatch, Relay estimates input tokens from supported request fields and derives an output estimate using request limits and a heuristic fallback. These estimates are useful for admission and pacing but are not guaranteed to match a model-specific tokenizer.

Actual usage

When a successful upstream response reports usage, Relay records actual input and output tokens. When exact usage is unavailable, the operational UI distinguishes the estimate fallback from reported actual usage.

Configurable pricing

An endpoint pricing policy can define input and output cost per one million tokens plus an optional flat request cost. Relay stores money in integer micros and estimates candidate cost before dispatch. When actual tokens are available, it reconciles token-based cost from the same policy.

Pricing data is operator-configured. Relay does not automatically synchronize provider prices and does not currently calculate a verified “avoided cloud spend” metric.

Attribution

Request logs connect usage to route kind, incoming model, selected upstream model, lane, endpoint, provider, status, wait and latency, fallback count, and estimated or actual token/cost fields. Hosted Relay stamps the organization and user identity from verified Platform context.