API reference

UsageTotals Class

Cumulative AI token/cost usage for a conversation, as reported by the active provider.
Providers that don't report usage leave these at zero.

Fields

CacheCreationTokens : long
Input tokens written to the provider's prompt cache, when reported.
Signature
long CacheCreationTokens
CacheReadTokens : long
Input tokens served from the provider's prompt cache, when reported.
Signature
long CacheReadTokens
CostUsd : double
Estimated cost in USD, when the provider reports it.
Signature
double CostUsd
InputTokens : long
Prompt (input) tokens consumed.
Signature
long InputTokens
OutputTokens : long
Completion (output) tokens produced.
Signature
long OutputTokens

Properties

TotalTokens : long
[Get]
Headline token count (input + output).
Signature
long TotalTokens