Class CountTokensResponse (1.122.0)

CountTokensResponse(
 total_tokens: int,
 total_billable_characters: int,
 _count_tokens_response: typing.Any,
)

The response from a count_tokens request. .. attribute:: total_tokens

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

:type: int

Attribute

Name Description
total_billable_characters int
The total number of billable characters counted across all instances from the request.

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月30日 UTC.