token_count
Token counter, count LLM tokens (GPT, OpenAI tokenizer), context window check. Count tokens in a text with an offline tokenizer: OpenAI's o200k_base (the encoding of GPT-4o, GPT-4.1 and o-series models). Counts for other model families (Claude, Gemini, Llama) are estimates. Optionally checks whether it fits a limit. The text is not stored or logged. Price: $0.001 per call (x402, USDC on Base).
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 | ||
| limit | No |