Token count estimate (plus characters, words, bytes)
$0.0021 USD per call Pay per call via x402, no signup
This call estimates how many LLM tokens a text uses with a documented offline heuristic (not an exact tokenizer; typically within about 15% for English), and also returns a low/high range, characters, words, lines and UTF-8 bytes. Input is text (use POST for long text), up to 400,000 characters.
x402: GET https://shop.lordevo.com/api/quick/token-count?text=The%20quick%20brown%20fox%20jumps%20over%20the%20lazy%20dog. or POST the same fields as JSON to https://shop.lordevo.com/api/quick/token-count · MCP tool token_count at https://shop.lordevo.com/mcp
The first call answers HTTP 402 with the price ($0.0021 USD per call, USDC on Base); any x402 client pays and retries. Instant tools that fail or are refused are not charged. Discovery is free: /catalog.json, /openapi.json, /llms.txt.
Example
The catalog's own example for this tool (illustrative sample values, not a live result).
Input
{
"text": "The quick brown fox jumps over the lazy dog."
}Output
{
"tool": "token-count",
"tokens_estimate": 10,
"range": {
"low": 8,
"high": 12
},
"chars_div_4": 11,
"characters": 44,
"words": 9,
"lines": 1,
"bytes_utf8": 44,
"is_estimate": true,
"method": "Offline heuristic (no tokenizer library)..."
}