---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/llm/anthropic_messages/count_tokens/type-aliases/AnthropicMessagesCountTokensRequestInput.md
description: Public count-token input shape accepted by the exported helpers.
---

# Type Alias: AnthropicMessagesCountTokensRequestInput

```ts
type AnthropicMessagesCountTokensRequestInput =
  | DispatchContext
  | {
      messages: AnthropicMessageParam[];
      system?: string | AnthropicTextBlockParam[];
      tools?: AnthropicTool[];
    };
```

Defined in: [src/batteries/llm/anthropic\_messages/count\_tokens.ts:78](https://github.com/NHTIO/ADK/blob/v1.20261003.0/src/src/batteries/llm/anthropic_messages/count_tokens.ts#L78)

Public count-token input shape accepted by the exported helpers.

## Union Members

[`DispatchContext`](../../../../../types/interfaces/DispatchContext.md)

***

### Type Literal

```ts
{
  messages: AnthropicMessageParam[];
  system?:   | string
     | AnthropicTextBlockParam[];
  tools?: AnthropicTool[];
}
```

| Name       | Type                                                                                              | Description                                             | Defined in                                                                                                                                                              |
| ---------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `messages` | [`AnthropicMessageParam`](../../types/type-aliases/AnthropicMessageParam.md)\[]                    | Pre-built Anthropic messages to count.                  | [src/batteries/llm/anthropic\_messages/count\_tokens.ts:82](https://github.com/NHTIO/ADK/blob/v1.20261003.0/src/src/batteries/llm/anthropic_messages/count_tokens.ts#L82) |
| `system?`  | | `string` | [`AnthropicTextBlockParam`](../../types/type-aliases/AnthropicTextBlockParam.md)\[] | Optional pre-built Anthropic system prompt to count.    | [src/batteries/llm/anthropic\_messages/count\_tokens.ts:84](https://github.com/NHTIO/ADK/blob/v1.20261003.0/src/src/batteries/llm/anthropic_messages/count_tokens.ts#L84) |
| `tools?`   | [`AnthropicTool`](../../types/type-aliases/AnthropicTool.md)\[]                                    | Optional pre-built Anthropic tool definitions to count. | [src/batteries/llm/anthropic\_messages/count\_tokens.ts:86](https://github.com/NHTIO/ADK/blob/v1.20261003.0/src/src/batteries/llm/anthropic_messages/count_tokens.ts#L86) |
