77trust / 100

Token Count Multi

by denk.halowerk.com in Onchain & crypto

x402 APIPassing, checked 14 min ago

Count the tokens of a text for 12 tokenizers at once: OpenAI o200k/cl100k/p50k/r50k plus Qwen, DeepSeek, Mistral Tekken, Falcon, GPT-NeoX, Yi, Granite and GLM. Exact counts, not estimates: OpenAI encodings via js-tiktoken, other families via their published tokenizer.json (Hugging Face, pinned revisions, SHA-256 checked, open licenses only: Apache-2.0 or MIT) run with transformers.js.

POST
https://denk.halowerk.com/v1/token-count-multi
Price
$0.003
per call in USDC
Uptime
96.0%
last 30 days
Response time
138 ms
246 ms slowest 5%
Last check
Passed
14 min ago, next in 14 min

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://denk.halowerk.com/v1/token-count-multi

Each call costs $0.003 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://denk.halowerk.com/v1/token-count-multi
content-type: application/json

{
  "text": "Die Rechnung ist innerhalb von 14 Tagen ohne Abzug zu bezahlen.",
  "tokenizers": [
    "o200k_base",
    "qwen2.5",
    "mistral-tekken"
  ]
}

Parameters

ParameterTypeRequiredDescription
textstringYes
tokenizersarray of stringNo

Example response

The provider's example. We can't check it without paying.

Example response, 119 lines
{
  "limitations": [
    "Counts cover the raw text only; chat templates, system prompts and tool definitions add provider-specific tokens.",
    "Anthropic and Google tokenizers are not published and are therefore not included."
  ],
  "result": {
    "bytes_utf8": 63,
    "characters": 63,
    "max_tokens": 20,
    "min_tokens": 14,
    "results": [
      {
        "chars_per_token": 4.5,
        "kind": "tiktoken",
        "license": "MIT",
        "models": [
          "gpt-4o",
          "gpt-4.1",
          "gpt-4.5",
          "gpt-5 family (tiktoken prefix \"gpt-5\")",
          "o1"
        ],
        "tokenizer": "o200k_base",
        "tokens": 14
      },
      {
        "chars_per_token": 3.15,
        "kind": "huggingface",
        "license": "Apache-2.0",
        "models": [
          "Qwen2.5 family",
          "Qwen3 family (identical vocabulary, merges and pre-tokenizer; compared with Qwen/Qwen3-0.6B@c1899de)"
        ],
        "tokenizer": "qwen2.5",
        "tokens": 20
      },
      {
        "chars_per_token": 3.706,
        "kind": "huggingface",
        "license": "Apache-2.0",
        "models": [
          "Mistral NeMo (Tekken tokenizer)"
        ],
        "tokenizer": "mistral-tekken",
        "tokens": 17
      }
    ],
    "spread_percent": 42.9,
    "supported_tokenizers": [
      {
        "download": false,
        "kind": "tiktoken",
        "license": "MIT",
        "models": [
          "gpt-4o",
          "gpt-4.1",
          "gpt-4.5",
          "gpt-5 family (tiktoken prefix \"gpt-5\")",
          "o1"
        ],
        "source": "js-tiktoken 1.0.21 (MIT) with OpenAI tiktoken ranks; model mapping per github.com/openai/tiktoken/blob/main/tiktoken/model.py (commit 212b893, 2026-08-17)",
        "tokenizer": "o200k_base"
      },
      {
        "download": false,
        "kind": "tiktoken",
        "license": "MIT",
        "models": [
          "gpt-4",
          "gpt-3.5-turbo",
          "text-embedding-3-small",
          "text-embedding-3-large",
          "text-embedding-ada-002"
        ],
        "source": "js-tiktoken 1.0.21 (MIT) with OpenAI tiktoken ranks; model mapping per github.com/openai/tiktoken/blob/main/tiktoken/model.py (commit 212b893, 2026-08-17)",
        "tokenizer": "cl100k_base"
      },
      {
        "download": false,
        "kind": "tiktoken",
        "license": "MIT",
        "models": [
          "text-davinci-002",
          "text-davinci-003",
          "code-davinci-002 (deprecated)"
        ],
        "source": "js-tiktoken 1.0.21 (MIT) with OpenAI tiktoken ranks; model mapping per github.com/openai/tiktoken/blob/main/tiktoken/model.py (commit 212b893, 2026-08-17)",
        "tokenizer": "p50k_base"
      },
      {
        "download": false,
        "kind": "tiktoken",
        "license": "MIT",
        "models": [
          "davinci",
          "curie",
          "babbage",
          "ada (GPT-3 base models, deprecated)"
        ],
        "source": "js-tiktoken 1.0.21 (MIT) with OpenAI tiktoken ranks; model mapping per github.com/openai/tiktoken/blob/main/tiktoken/model.py (commit 212b893, 2026-08-17)",
        "tokenizer": "r50k_base"
      },
      {
        "download": true,
        "kind": "huggingface",
        "license": "Apache-2.0",
        "models": [
          "Qwen2.5 family",
          "Qwen3 family (identical vocabulary, merges and pre-tokenizer; compared with Qwen/Qwen3-0.6B@c1899de)"
        ],
        "source": "huggingface.co/Qwen/Qwen2.5-0.5B@060db64 (tokenizer.json)",
        "tokenizer": "qwen2.5"
      }
    ],
    "words": 11
  },
  "service": "token-count-multi",
  "status": "success"
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.003.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://denk.halowerk.com/v1/token-count-multi' \
  -H 'content-type: application/json' \
  --data-raw '{"text":"Die Rechnung ist innerhalb von 14 Tagen ohne Abzug zu bezahlen.","tokenizers":["o200k_base","qwen2.5","mistral-tekken"]}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://denk.halowerk.com/v1/token-count-multi' \
  -H 'content-type: application/json' \
  --data-raw '{"text":"Die Rechnung ist innerhalb von 14 Tagen ohne Abzug zu bezahlen.","tokenizers":["o200k_base","qwen2.5","mistral-tekken"]}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.003 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.003" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.003 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fdenk.halowerk.com%2Fv1%2Ftoken-count-multi&method=POST
const res = await pay("https://denk.halowerk.com/v1/token-count-multi", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "text": "Die Rechnung ist innerhalb von 14 Tagen ohne Abzug zu bezahlen.",
    "tokenizers": [
      "o200k_base",
      "qwen2.5",
      "mistral-tekken"
    ]
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.003 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.003"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://denk.halowerk.com/v1/token-count-multi",
        json={
            "text": "Die Rechnung ist innerhalb von 14 Tagen ohne Abzug zu bezahlen.",
            "tokenizers": [
                "o200k_base",
                "qwen2.5",
                "mistral-tekken",
            ],
        },
    )
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
14 min agoPassed402173 ms$0.003
13 h agoPassed402120 ms$0.003
2 days agoTimed out---
4 days agoPassed402127 ms$0.003
4 days agoPassed402118 ms$0.003
Show 10 older checks
5 days agoPassed402198 ms$0.003
5 days agoPassed402132 ms$0.003
5 days agoPassed402138 ms$0.003
6 days agoPassed402122 ms$0.003
6 days agoPassed402138 ms$0.003
6 days agoPassed402132 ms$0.003
7 days agoPassed402124 ms$0.003
7 days agoPassed402179 ms$0.003
7 days agoPassed402144 ms$0.003
8 days agoPassed402140 ms$0.003