# LLM Token Counter

> Free tool #2

Count the tokens in any prompt — exact for OpenAI models, estimated for Claude and Gemini.

## Three ways to use it

**Web** — the interactive page: https://telemeter.ai/tools/llm-token-counter

**MCP** — a `tools/call` on the public MCP server at https://telemeter.ai/mcp (tool name: `llm-token-counter`), read-only, no key required.

**REST** — `POST https://telemeter.ai/api/tools/llm-token-counter` with a JSON body matching the input schema below:

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "maxLength": 600000
    },
    "model": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "text",
    "model"
  ],
  "additionalProperties": false
}
```

[Open the interactive page](https://telemeter.ai/tools/llm-token-counter) · [Every tool and doc, machine-readable](https://telemeter.ai/llms.txt)
