Token count estimate (plus characters, words, bytes) ($0.002/call)
token_count$0.002 per call (x402, USDC on Base; free trial: add "trial": true or use try_free). [Data utilities] Estimates how many LLM tokens a text uses with a documented offline heuristic (not an exact tokenizer; typically within about 15% for English), with a low/high range, characters, words, lines and UTF-8 bytes. Input: text (POST for long text). Limit: 400,000 characters.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "token_count"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Plain text or Markdown, 1-400,000 characters (short text in the query; long text as POST JSON {"text": "..."}) | |
| trial | No | Optional. true = free if a trial call is left (3 per IP per UTC day), else the payment terms. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | No | ||
| cache | No | ||
| lines | No | ||
| range | No | ||
| words | No | ||
| _trial | No | Present when the call was a free trial call. | |
| method | No | ||
| provider | No | ||
| price_usd | No | ||
| bytes_utf8 | No | ||
| characters | No | ||
| chars_div_4 | No | ||
| is_estimate | No | ||
| tokens_estimate | No |