Skip to content
Giorgos Moustakas
/ labAI · Tools

Multi-provider tokenizer + cost estimator

Counts tokens with the cl100k_base BPE tokenizer (used by recent OpenAI models) and applies the pricing tables from the cuesheet PyPI library to estimate per-call cost across families. Claude and Gemini counts use the same BPE as a close approximation, since neither provider ships an in-browser tokenizer; the relative order is reliable.

stackgpt-tokenizercuesheet pricing

178 chars · 0 input tokens (cl100k_base; Claude and Gemini counts land within ~5%)

Cost = (input × in-price + output × out-price). Both per million tokens.

ModelIn / 1MOut / 1MCost per callPer 1K calls
Claude Opus 4.7
claude-opus-4-7
$5.00$25.00$0.006400$6.40
Claude Sonnet 4.5
claude-sonnet-4-5
$3.00$15.00$0.003840$3.84
Claude Haiku 4.5
claude-haiku-4-5
$1.00$5.00$0.001280$1.28
GPT-5
gpt-5
$1.25$10.00$0.002560$2.56
GPT-4o
gpt-4o
$2.50$10.00$0.002560$2.56
GPT-4o mini
gpt-4o-mini
$0.15$0.60$0.000154$0.15
Gemini 2.5 Pro
gemini-2.5-pro
$1.25$10.00$0.002560$2.56
Gemini 2.5 Flash
gemini-2.5-flash
$0.30$2.50$0.000640$0.64
pricing source · litellm / model_prices_and_context_window.jsonfetched 2026-05-21cached 24h · auto-refreshes