Token count
x402Grade CLast checked 37 min ago
POST https://agent402.tools/api/token-count
Count exact LLM tokens for a string using the real OpenAI BPE (o200k_base for gpt-4o/o-series, cl100k_base for gpt-4/gpt-3.5). Deterministic, offline - budget context windows without calling a model.
Price$0.001per model request · paid in USD on Solana
Uptime100%
4/4 probes · 588.5 ms
Score65Grade C
Paid usage, 30 days0payers · 0 calls
Warnings
Wallet mismatch The payout wallet in its live payment answer differs from its catalogue listing on the same network.
How to buy
This endpoint takes pay-per-call payments over x402. Call it once without paying to see its live price; any x402 client then pays and retries automatically.
curl -i -X POST "https://agent402.tools/api/token-count"
# HTTP/1.1 402 Payment Required: price, asset and payTo are in the responseRecent checks
| Checked (UTC) | Result | Status | Time | Live price |
|---|---|---|---|---|
| 2026-10-11 10:16 | Valid 402 | 402 | 653 ms | $0.001 |
| 2026-10-11 05:46 | Valid 402 | 402 | 495 ms | $0.001 |
| 2026-10-11 01:15 | Valid 402 | 402 | 1268 ms | $0.001 |
| 2026-10-10 20:45 | Valid 402 | 402 | 524 ms | $0.001 |
Receipts
No test purchases yet. Graded test purchases are next on our list; until then every number here comes from unpaid checks.
What a check proves