[[["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-04-24 UTC."],[],[],null,["# CountTokensRequest interface\n\nParams for calling [GenerativeModel.countTokens()](./vertexai.generativemodel.md#generativemodelcounttokens)\n\n**Signature:** \n\n export interface CountTokensRequest \n\nProperties\n----------\n\n| Property | Type | Description |\n|-------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|------------------------------------------------------------------------|\n| [contents](./vertexai.counttokensrequest.md#counttokensrequestcontents) | [Content](./vertexai.content.md#content_interface)\\[\\] | |\n| [generationConfig](./vertexai.counttokensrequest.md#counttokensrequestgenerationconfig) | [GenerationConfig](./vertexai.generationconfig.md#generationconfig_interface) | Configuration options that control how the model generates a response. |\n| [systemInstruction](./vertexai.counttokensrequest.md#counttokensrequestsysteminstruction) | string \\| [Part](./vertexai.md#part) \\| [Content](./vertexai.content.md#content_interface) | Instructions that direct the model to behave a certain way. |\n| [tools](./vertexai.counttokensrequest.md#counttokensrequesttools) | [Tool](./vertexai.md#tool)\\[\\] | [Tool](./vertexai.md#tool) configuration. |\n\nCountTokensRequest.contents\n---------------------------\n\n**Signature:** \n\n contents: Content[];\n\nCountTokensRequest.generationConfig\n-----------------------------------\n\nConfiguration options that control how the model generates a response.\n\n**Signature:** \n\n generationConfig?: GenerationConfig;\n\nCountTokensRequest.systemInstruction\n------------------------------------\n\nInstructions that direct the model to behave a certain way.\n\n**Signature:** \n\n systemInstruction?: string | Part | Content;\n\nCountTokensRequest.tools\n------------------------\n\n[Tool](./vertexai.md#tool) configuration.\n\n**Signature:** \n\n tools?: Tool[];"]]