Skip to content

Interface: UsageTotals

Defined in: packages/aiui-oracle/src/types.ts:555

Token usage tallied from response.done payloads, with the MODALITY split the vendor reports — because that is what pricing turns on: realtime audio and text differ by roughly 8× per token, so a flat total cannot be costed. Audio figures are SUBSETS of their totals (genai-prices' convention and the vendor's), so text = total − audio.

Properties

approximateResponses

approximateResponses: number

Defined in: packages/aiui-oracle/src/types.ts:583

Responses priced under a TRIMMED model id, because the catalog had no entry for the exact one — which happens with dated snapshots and fresh point releases. A point release usually shares its base rates, but "usually" is not "verified", so a total containing any of these is shown with a ~.


cachedInputTokens

cachedInputTokens: number

Defined in: packages/aiui-oracle/src/types.ts:561

The cached subset of inputTokens — billed at a deep discount, and the single biggest lever on what a long conversation costs.


inputAudioTokens

inputAudioTokens: number

Defined in: packages/aiui-oracle/src/types.ts:558

The audio subset of inputTokens.


inputTokens

inputTokens: number

Defined in: packages/aiui-oracle/src/types.ts:556


outputAudioTokens

outputAudioTokens: number

Defined in: packages/aiui-oracle/src/types.ts:564

The audio subset of outputTokens.


outputTokens

outputTokens: number

Defined in: packages/aiui-oracle/src/types.ts:562


responses

responses: number

Defined in: packages/aiui-oracle/src/types.ts:565


unpricedResponses

unpricedResponses: number

Defined in: packages/aiui-oracle/src/types.ts:575

Responses the catalog could NOT price.

Carried so a running total is never quietly short: a cost display that under-reports without saying so is worse than no display, and the catalog genuinely lags new model ids. Non-zero means "at least this much".


usd?

optional usd?: number

Defined in: packages/aiui-oracle/src/types.ts:567

Running cost, when the price catalog knew the model.