Optional. The instances that are the input to token computing API call. Schema is identical to the prediction schema of the text model, even for the non-text models, like chat models, or Codey models.
model
string
Optional. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*
[[["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-06-27 UTC."],[],[],null,["# Method: endpoints.computeTokens\n\n**Full name**: projects.locations.endpoints.computeTokens\n\nReturn a list of tokens based on the input text. \n\n### Endpoint\n\npost `https:``/``/{service-endpoint}``/v1beta1``/{endpoint}:computeTokens` \nWhere `{service-endpoint}` is one of the [supported service endpoints](/vertex-ai/docs/reference/rest#rest_endpoints).\n\n### Path parameters\n\n`endpoint` `string` \nRequired. The name of the Endpoint requested to get lists of tokens and token ids.\n\n### Request body\n\nThe request body contains data with the following structure:\nFields `instances[]` `value (`[Value](https://protobuf.dev/reference/protobuf/google.protobuf/#value)` format)` \nOptional. The instances that are the input to token computing API call. Schema is identical to the prediction schema of the text model, even for the non-text models, like chat models, or Codey models.\n`model` `string` \nOptional. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/\\*/models/\\*\n`contents[]` `object (`[Content](/vertex-ai/docs/reference/rest/v1beta1/Content)`)` \nOptional. Input content. \n\n### Response body\n\nIf successful, the response body contains an instance of [ComputeTokensResponse](/vertex-ai/docs/reference/rest/v1beta1/ComputeTokensResponse)."]]