Skip to main content
airmux records one usage event for each upstream attempt, including failed and cancelled attempts.

Usage event fields

token_usage_source describes how the gateway obtained the token counts:
  • provider: the adapter accepted upstream usage counts without gateway estimation
  • estimated: usage was absent or the adapter identified it as incomplete, so the gateway estimated missing counts from the request and observed response content
  • not_applicable: the request was denied before routing, with zero token counts and cost
All cost_*_usd fields are estimates using catalog prices at request time, including when token_usage_source is provider. Token-count provenance does not make the calculated cost a provider invoice amount.

Reports

The webapp’s Usage and Requests pages are available at organization and workspace scope. Usage defaults to the last 30 days. The summary shows estimated spend, distinct requests, input and output tokens, and average cost per request. The trend and attribution table use the same recorded events. Attribution can group by workspace, key owner, inference key, served model, provider, or provider credential. One request_id is one logical request, even when fallback creates several provider attempts. Recorded cost and tokens add across attempts, including failed attempts with recorded usage. A request belongs to the period of its request start time, even if an attempt finishes later. The Requests page supports exact request_id lookup and pagination. Detail shows approximate attempt order from start timestamps. Key owner means the owner of the inference key. Deleted resources remain identifiable by their recorded IDs when names are unavailable. Costs are gateway estimates recorded at request time. Events arrive asynchronously, so a refreshed report can change as late events arrive. The API includes /usage, /attribution, /filter-options, /requests, and /requests/{request_id}. Periods include Today, 7 days, 30 days, month to date, and custom dates. Reports compare with the preceding interval of equal duration.

Inspect events

Add -f json for complete event fields. The default table drops columns to fit a narrow terminal.