Usage
Statistics on the interaction request's token usage.
Types
The token count for a single response modality.
The number of grounding tool counts.
The token count for a single response modality.
The token count for a single response modality.
The token count for a single response modality.
Functions
Returns the raw JSON value of cachedTokensByModality.
Returns the raw JSON value of groundingToolCount.
Returns the raw JSON value of inputTokensByModality.
Returns the raw JSON value of outputTokensByModality.
Returns the raw JSON value of toolUseTokensByModality.
Returns the raw JSON value of totalCachedTokens.
Returns the raw JSON value of totalInputTokens.
Returns the raw JSON value of totalOutputTokens.
Returns the raw JSON value of totalThoughtTokens.
Returns the raw JSON value of totalTokens.
Returns the raw JSON value of totalToolUseTokens.
Returns a mutable builder for constructing an instance of Usage.
A breakdown of cached token usage by modality.
Grounding tool count.
A breakdown of input token usage by modality.
A breakdown of output token usage by modality.
A breakdown of tool-use token usage by modality.
Number of tokens in the cached part of the prompt (the cached content).
Number of tokens in the prompt (context).
Total number of tokens across all the generated responses.
Number of tokens of thoughts for thinking models.
Total token count for the interaction request (prompt + responses + other internal tokens).
Number of tokens present in tool-use prompt(s).