agents.204-168-199-108.sslip.io/v1/util/token-count
Estimate how many LLM tokens a text uses before you send it (BPE-style estimate that GPT, Claude and Llama tokenizers match within ~15% on normal text; CJK and non-Latin scripts handled). Optional: context_limit + reserve_output_tokens → does it fit and how many tokens are left; price_per_million → cost in USD; chunk_tokens → how many chunks to split into. Returns tokens_estimate, low/high range,
GET
https://agents.204-168-199-108.sslip.io/v1/util/token-countUptime100% of 1 check in 30 days
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
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agents.204-168-199-108.sslip.io/v1/util/token-count?chunk_tokens=16&context_limit=8192&price_per_million=3&reserve_output_tokens=1024&text=Hello+world%21+The+quick+brown+fox+jumps+over+the+lazy+dog.+Internationalization+costs+12345+tokens.%0A%0A%E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C");
console.log(await res.json());Example input
{
"chunk_tokens": "16",
"context_limit": "8192",
"price_per_million": "3",
"reserve_output_tokens": "1024",
"text": "Hello world! The quick brown fox jumps over the lazy dog. Internationalization costs 12345 tokens.\n\n你好世界"
}