UsageMetadata
@Serializable
Usage metadata for a generate content request.
Constructors
Link copied to clipboard
constructor(promptTokenCount: Int? = null, candidatesTokenCount: Int? = null, totalTokenCount: Int? = null, thoughtsTokenCount: Int? = null, toolUsePromptTokenCount: Int? = null, cachedContentTokenCount: Int? = null, promptTokensDetails: List<ModalityTokenCount>? = null, candidatesTokensDetails: List<ModalityTokenCount>? = null)
Properties
Link copied to clipboard
The number of tokens served from the cached content (cache read).
Link copied to clipboard
The number of tokens in the candidates.
Link copied to clipboard
A per-modality breakdown of the candidates token count.
Link copied to clipboard
The number of tokens in the prompt.
Link copied to clipboard
A per-modality breakdown of the prompt token count.
Link copied to clipboard
The number of tokens that were part of the model's "thoughts" output, for thinking models.
Link copied to clipboard
The number of tokens in tool-execution results provided back to the model as input.
Link copied to clipboard
The total number of tokens.