> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ag2.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# autogen.token_count_utils.count_token

<code class="doc-symbol doc-symbol-heading doc-symbol-function" />

#### count\_token

```python theme={null}
count_token(input: str | list[str] | dict[str, Any], model: str = 'gpt-3.5-turbo-0613') -> int
```

Count number of tokens used by an OpenAI model.<br />

<b>Parameters:</b>

| Name    | Description                                                                                             |
| ------- | ------------------------------------------------------------------------------------------------------- |
| `input` | (str, list, dict): Input to the model.<br /><br />**Type:** str \| list\[str] \| dict\[str, typing.Any] |
| `model` | (str): Model name.<br /><br />**Type:** str<br /><br />**Default:** 'gpt-3.5-turbo-0613'                |

<b>Returns:</b>

| Type | Description                           |
| ---- | ------------------------------------- |
| int  | int: Number of tokens from the input. |

<br />
