google.ai.generativelanguage.GenerateContentResponse.UsageMetadata

Metadata on the generation request's token usage.

prompt_token_count int

Number of tokens in the prompt.

candidates_token_count int

Total number of tokens across the generated candidates.

total_token_count int

Total token count for the generation request (prompt + candidates).