Class GenerateContentResponseUsageMetadata

Usage metadata about response(s).

Constructors

Properties

cachedContentTokenCount?: number

Output only. Number of tokens in the cached part in the input (the cached content).

cacheTokensDetails?: ModalityTokenCount[]

Output only. List of modalities of the cached content in the request input.

candidatesTokenCount?: number

Number of tokens in the response(s).

candidatesTokensDetails?: ModalityTokenCount[]

Output only. List of modalities that were returned in the response.

promptTokenCount?: number

Number of tokens in the request. When cached_content is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.

promptTokensDetails?: ModalityTokenCount[]

Output only. List of modalities that were processed in the request input.

thoughtsTokenCount?: number

Output only. Number of tokens present in thoughts output.

toolUsePromptTokenCount?: number

Output only. Number of tokens present in tool-use prompt(s).

toolUsePromptTokensDetails?: ModalityTokenCount[]

Output only. List of modalities that were processed for tool-use request inputs.

totalTokenCount?: number

Total token count for prompt, response candidates, and tool-use prompts (if present).

trafficType?: TrafficType

Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota.