[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-24 UTC."],[],[],null,["# Firebase.AI.CountTokensResponse Struct Reference\n\nFirebase.AI.CountTokensResponse\n===============================\n\nThe model's response to a count tokens request.\n\nSummary\n-------\n\n| ### Properties ||\n|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [PromptTokensDetails](#struct_firebase_1_1_a_i_1_1_count_tokens_response_1a60965b6a6cf4790205e1a425786eed74) | `IReadOnlyList\u003c `[ModalityTokenCount](/docs/reference/unity/struct/firebase/a-i/modality-token-count#struct_firebase_1_1_a_i_1_1_modality_token_count)` \u003e` The breakdown, by modality, of how many tokens are consumed by the prompt. |\n| [TotalBillableCharacters](#struct_firebase_1_1_a_i_1_1_count_tokens_response_1a6eb175efeeae649f94f3d6e83e497bec) | `int` **[Deprecated.](/docs/reference/unity/deprecated/deprecated)** Use TotalTokens instead; Gemini 2.0 series models and newer are always billed by token count. The total number of billable characters in the text input given to the model as a prompt. |\n| [TotalTokens](#struct_firebase_1_1_a_i_1_1_count_tokens_response_1a4cd653f744e15be9e5ea40748e3c2c39) | `int` The total number of tokens in the input given to the model as a prompt. |\n\nProperties\n----------\n\n### PromptTokensDetails\n\n```c#\nIReadOnlyList\u003c ModalityTokenCount \u003e Firebase::AI::CountTokensResponse::PromptTokensDetails\n``` \nThe breakdown, by modality, of how many tokens are consumed by the prompt. \n\n### TotalBillableCharacters\n\n```c#\nint Firebase::AI::CountTokensResponse::TotalBillableCharacters\n``` \nThe total number of billable characters in the text input given to the model as a prompt.\n\nImportant: This does not include billable image, video or other non-text input. See [Firebase AI pricing](https://firebase.google.com/docs/vertex-ai/pricing) for details.\n\nUse TotalTokens instead; Gemini 2.0 series models and newer are always billed by token count.\n\n**[Deprecated.](/docs/reference/unity/deprecated/deprecated)**Use TotalTokens instead; Gemini 2.0 series models and newer are always billed by token count. \n\n### TotalTokens\n\n```c#\nint Firebase::AI::CountTokensResponse::TotalTokens\n``` \nThe total number of tokens in the input given to the model as a prompt."]]