Response from calling [GenerativeModel.countTokens()](https://firebase.google.com/docs/reference/js/ai.generativemodel#generativemodelcounttokens).

**Signature:**

    export interface CountTokensResponse 

## Properties

| Property | Type | Description |
|---|---|---|
| [promptTokensDetails](https://firebase.google.com/docs/reference/js/ai.counttokensresponse#counttokensresponseprompttokensdetails) | [ModalityTokenCount](https://firebase.google.com/docs/reference/js/ai.modalitytokencount#modalitytokencount_interface)\[\] | The breakdown, by modality, of how many tokens are consumed by the prompt. |
| [totalTokens](https://firebase.google.com/docs/reference/js/ai.counttokensresponse#counttokensresponsetotaltokens) | number | The total number of tokens counted across all instances from the request. |

## CountTokensResponse.promptTokensDetails

The breakdown, by modality, of how many tokens are consumed by the prompt.

**Signature:**

    promptTokensDetails?: ModalityTokenCount[];

## CountTokensResponse.totalTokens

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

**Signature:**

    totalTokens: number;