Firebase. AI. CountTokensResponse
The model's response to a count tokens request.
Summary
Properties | |
---|---|
PromptTokensDetails | IReadOnlyList< ModalityTokenCount > The breakdown, by modality, of how many tokens are consumed by the prompt. |
TotalBillableCharacters | int The total number of billable characters in the text input given to the model as a prompt. |
TotalTokens | int The total number of tokens in the input given to the model as a prompt. |
Properties
PromptTokensDetails
IReadOnlyList< ModalityTokenCount > Firebase::AI::CountTokensResponse::PromptTokensDetails
The breakdown, by modality, of how many tokens are consumed by the prompt.
TotalBillableCharacters
int Firebase::AI::CountTokensResponse::TotalBillableCharacters
The total number of billable characters in the text input given to the model as a prompt.
Important: This does not include billable image, video or other non-text input. See Firebase AI pricing for details.
Use TotalTokens instead; Gemini 2.0 series models and newer are always billed by token count.
Deprecated. Use TotalTokens instead; Gemini 2.0 series models and newer are always billed by token count.
TotalTokens
int Firebase::AI::CountTokensResponse::TotalTokens
The total number of tokens in the input given to the model as a prompt.