Starting April 29, 2025, Gemini 1.5 Pro and Gemini 1.5 Flash models are not available in projects that have no prior usage of these models, including new projects. For details, see Model versions and lifecycle.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-16 UTC."],[],[],null,["# Interface CountTokensResponseOrBuilder (1.32.0)\n\n public interface CountTokensResponseOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### getPromptTokensDetails(int index)\n\n public abstract ModalityTokenCount getPromptTokensDetails(int index)\n\nOutput only. List of modalities that were processed in the request input.\n\n`\nrepeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];\n`\n\n### getPromptTokensDetailsCount()\n\n public abstract int getPromptTokensDetailsCount()\n\nOutput only. List of modalities that were processed in the request input.\n\n`\nrepeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];\n`\n\n### getPromptTokensDetailsList()\n\n public abstract List\u003cModalityTokenCount\u003e getPromptTokensDetailsList()\n\nOutput only. List of modalities that were processed in the request input.\n\n`\nrepeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];\n`\n\n### getPromptTokensDetailsOrBuilder(int index)\n\n public abstract ModalityTokenCountOrBuilder getPromptTokensDetailsOrBuilder(int index)\n\nOutput only. List of modalities that were processed in the request input.\n\n`\nrepeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];\n`\n\n### getPromptTokensDetailsOrBuilderList()\n\n public abstract List\u003c? extends ModalityTokenCountOrBuilder\u003e getPromptTokensDetailsOrBuilderList()\n\nOutput only. List of modalities that were processed in the request input.\n\n`\nrepeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];\n`\n\n### getTotalBillableCharacters()\n\n public abstract int getTotalBillableCharacters()\n\nThe total number of billable characters counted across all instances from\nthe request.\n\n`int32 total_billable_characters = 2;`\n\n### getTotalTokens()\n\n public abstract int getTotalTokens()\n\nThe total number of tokens counted across all instances from the request.\n\n`int32 total_tokens = 1;`"]]