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

# Token count API

> Estimate text or chat token counts.

`POST /v1/tokens/count`

```json theme={null}
{
  "model": "auto",
  "input": [{ "role": "user", "content": "Count this before routing." }]
}
```

```json theme={null}
{
  "object": "token_count",
  "model": "mesh/claude-sonnet-4.5",
  "total_tokens": 9
}
```
