Slash-tokens – know LLM cost before the call leaves your machine
SMRTR summary
slash-tokens is a lightweight JavaScript/TypeScript library that intercepts LLM API calls to Anthropic, OpenAI, xAI, and Google, estimating token costs before requests leave your machine. Powered by a 4.8 KB Zig-compiled WASM tokenizer, it delivers sub-millisecond, non-blocking preflight checks. An optional hosted dashboard tracks savings for $39/month, with zero dependencies and support across Node, Bun, Deno, and edge runtimes.
SMRTR provides this summary for quick context. The original article belongs to Hacker News.
Read the original article