CountTokensResponse

Response message for [PredictionService.CountTokens][].

Fields
totalTokens integer

The total number of tokens counted across all instances from the request.

totalBillableCharacters integer

The total number of billable characters counted across all instances from the request.

promptTokensDetails[] object (ModalityTokenCount )

Output only. List of modalities that were processed in the request input.

JSON representation
{
 "totalTokens": integer,
 "totalBillableCharacters": integer,
 "promptTokensDetails": [
 {
 object (ModalityTokenCount )
 }
 ]
}

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月11日 UTC.