Skip to content
Fourohtwo

lookups.mtfit-mcp.workers.dev/api/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.

BaseUnchecked
GEThttps://lookups.mtfit-mcp.workers.dev/api/token_count

UptimeNot checked yet

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://lookups.mtfit-mcp.workers.dev/api/token_count?text=Hello%2C+world%21+How+many+tokens+is+this+sentence%3F");
console.log(await res.json());

Example input

{
  "text": "Hello, world! How many tokens is this sentence?"
}

More from Lookup Kit