Table of Contents

Class CountTokensResponse

Namespace
GenerativeAI.Types
Assembly
GenerativeAI.dll

Response to count tokens.

public class CountTokensResponse
Inheritance
CountTokensResponse
Inherited Members
Extension Methods

Properties

CachedContentTokenCount

Number of tokens in the cached part of the prompt (the cached content).

[JsonPropertyName("cachedContentTokenCount")]
public int CachedContentTokenCount { get; set; }

Property Value

int

PromptTokensDetails

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

[JsonPropertyName("promptTokensDetails")]
public List<ModalityTokenCount>? PromptTokensDetails { get; set; }

Property Value

List<ModalityTokenCount>

TotalTokens

The number of tokens that the Model tokenizes the prompt into. Always non-negative.

[JsonPropertyName("totalTokens")]
public int TotalTokens { get; set; }

Property Value

int

See Also