# Lordevo Token Count Estimate

> Lordevo Token Count Estimate is a paid API for AI agents from shop.lordevo.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-31).

Estimates the number of LLM tokens in a given text using an offline heuristic, returning a token estimate with low/high range, plus character, word, line, and byte counts.

## Facts

- Endpoint: GET https://shop.lordevo.com/api/quick/token-count?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lordevo-token-count-estimate-94e18405
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HxP9tO0Fg9lJuuG1fFRd-

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability lordevo-token-count-estimate-94e18405
```

Example prompt: How many LLM tokens would this text use: 'Large language models process text by breaking it into tokens, which are chunks of characters roughly corresponding to words or word-pieces. Understanding token counts is essential for managing API costs and context window limits.'

## When to prefer this

Choose this endpoint when you need a fast, low-cost, offline-heuristic token count without calling an actual LLM tokenizer. It is ideal for pre-flight checks before LLM API calls, cost estimation, context window validation, or any situation where approximate token counts (within ~15% for English) are sufficient. Prefer it over LLM-native tokenizer APIs when latency and cost matter more than exact precision.

## Known failure modes

- Missing 'text' query parameter returns an error
- Text exceeding 400,000 characters may be rejected or truncated
- Very short or empty text may return near-zero estimates
- Non-UTF-8 encoded input may cause byte count inaccuracies
- Heuristic can be off by up to ~15% for non-English or code-heavy text
- Network timeout if the service is unavailable

## How this service works

Token count estimate (plus characters, words, bytes): 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). Lim

## Output

Returns a JSON object with: tokens_estimate (integer), a range object with low and high token estimates, characters (character count), words (word count), lines (line count), bytes_utf8 (UTF-8 byte count), chars_div_4 (characters divided by 4), is_estimate (boolean flag indicating this is an approximation), method (name of the heuristic used), and tool (identifier of the estimation tool).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Plain text or Markdown, 1-400,000 characters (short text in the query; long text as POST JSON {\"text\": \"...\"})"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "tool",
      "tokens_estimate",
      "is_estimate"
     ],
     "properties": {
      "tool": {
       "type": "string"
      },
      "lines": {
       "type": "integer"
      },
      "range": {
       "type": "object"
      },
      "words": {
       "type": "integer"
      },
      "method": {
       "type": "string"
      },
      "bytes_utf8": {
       "type": "integer"
      },
      "characters": {
       "type": "integer"
      },
      "chars_div_4": {
       "type": "integer"
      },
      "is_estimate": {
       "type": "boolean"
      },
      "tokens_estimate": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lordevo-token-count-estimate-94e18405/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from shop.lordevo.com](https://www.zero.xyz/host/shop.lordevo.com/llms.txt)
