{
  "id": "lordevo-quick-token-count",
  "name": "Token count estimate (plus characters, words, bytes)",
  "description": "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.",
  "provider": "Lordevo",
  "label": "Lordevo service",
  "operator_service": true,
  "category": "web-scraping",
  "kind": "http",
  "url": "https://shop.lordevo.com/api/quick/token-count",
  "method": "GET",
  "payment": "x402",
  "price_usd": 0.0021,
  "network": "base",
  "auth": "none (pay per call with x402: HTTP 402, USDC on Base mainnet)",
  "docs": "https://shop.lordevo.com/quick",
  "status": "up",
  "uptime_status": "up",
  "latency_ms": 179,
  "last_checked": "2026-12-02T05:48:49.276Z",
  "verified_quote": true,
  "price_match": true,
  "quote_price_usd": 0.0021,
  "source": {
    "id": "lordevo",
    "name": "Lordevo shop catalog",
    "url": "https://shop.lordevo.com/catalog.json",
    "attribution": "Lordevo (directory operator). Labelled \"Lordevo service\"."
  },
  "details": "https://lordevo.com/api/v1/services/lordevo-quick-token-count",
  "provider_url": "https://lordevo.com",
  "price_note": "$0.0021 per call (Lordevo quick check). Refused or failed calls are not charged.",
  "network_id": "eip155:8453",
  "asset": "USDC",
  "quote": {
    "x402_version": 2,
    "scheme": "exact",
    "price_usd": 0.0021,
    "amount_atomic": "2100",
    "asset": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
    "network_id": "eip155:8453",
    "pay_to": "0x0876A79Bb5A88Bf338E6b47b4530359527b01d73"
  },
  "how_to": [
    "GET https://shop.lordevo.com/api/quick/token-count?text=<text>",
    "The first answer is HTTP 402 (x402 v2 PAYMENT-REQUIRED header plus a v1 JSON body; USDC on Base mainnet). Pay and retry the same request.",
    "Also an MCP tool: token_count at https://shop.lordevo.com/mcp"
  ],
  "tags": [
    "tokens",
    "token count",
    "context window",
    "llm",
    "cost estimate",
    "text stats"
  ],
  "http_status": 402,
  "x402_402_seen": true,
  "first_seen": "2026-10-29T20:30:02.529Z",
  "verified_seller": {
    "domain": "shop.lordevo.com",
    "method": "wellknown",
    "verified_at": "2026-11-13T18:06:29.557Z",
    "last_check_at": "2026-11-28T21:35:47.336Z"
  },
  "install": [
    {
      "client": "lordevo-x402-js",
      "format": "js",
      "snippet": "// npm i lordevo-x402@0.1.5 @x402/fetch @x402/evm viem\nimport { fromPrivateKey } from 'lordevo-x402';\n\nconst lordevo = await fromPrivateKey(process.env.AGENT_WALLET_KEY, { maxPriceUsd: 0.0021 });\nconst result = await lordevo.call(\"token-count\", { text: \"<YOUR_INPUT>\" });\nconsole.log(result);",
      "notes": "Pays $0.0021 per call in USDC on Base from the wallet in AGENT_WALLET_KEY. Instant tools that fail or are refused (any answer of 400 or higher) are not charged. Long jobs (202) are charged when accepted and are not refunded automatically if they fail later.",
      "doc_url": "https://www.npmjs.com/package/lordevo-x402"
    },
    {
      "client": "lordevo-x402-py",
      "format": "python",
      "snippet": "# pip install \"lordevo-x402[pay]==0.1.5\"\nimport os\nfrom lordevo_x402 import LordevoSync\n\nlo = LordevoSync.from_private_key(os.environ[\"AGENT_WALLET_KEY\"], max_price_usd=0.0021)\nprint(lo.call(\"token-count\", \"<YOUR_INPUT>\"))",
      "notes": "Pays $0.0021 per call in USDC on Base. Instant tools that fail or are refused (any answer of 400 or higher) are not charged. Long jobs (202) are charged when accepted and are not refunded automatically if they fail later.",
      "doc_url": "https://pypi.org/project/lordevo-x402/"
    },
    {
      "client": "curl",
      "format": "shell",
      "snippet": "curl -i 'https://shop.lordevo.com/api/quick/token-count'",
      "notes": "Unpaid request: the answer should be HTTP 402 with the price and payment terms. Nothing is paid.",
      "doc_url": "https://x402.org"
    }
  ],
  "page": "https://lordevo.com/agents/service/lordevo-quick-token-count"
}