{"name":"token-count","description":"Estimates LLM token counts entirely locally, with no external lookups. Heuristic estimator targeting cl100k_base / o200k_base (GPT-4o) with calibrated multipliers for Claude and Gemini; the input model name is matched against an internal table of supported tokenizers. Accuracy ±5% versus tiktoken on typical English. Use it as a tokenizer estimate, GPT-4 token count, Claude token count, Gemini token count, or context-window pre-flight.","price":"$0.005","method":"POST","input_schema":{"properties":{"text":{"type":"string","description":"Text to count. Up to 1,000,000 chars."},"model":{"type":"string","description":"Target model. Examples: 'gpt-4o' (default), 'claude-sonnet-4-5', 'gemini-2-pro'. Free-form; matched against an internal multiplier table."}},"required":["text"]},"input_example":{"text":"Hello world, this is a test of the tokenizer.","model":"gpt-4o"},"output_example":{"text_chars":46,"model":"gpt-4o","matched_tokenizer":"gpt-4o","estimated_tokens":11,"accuracy_note":"Heuristic estimate, ±5% vs tiktoken cl100k_base on typical English text. Larger error on heavy punctuation, code, or non-Latin scripts. Computed locally in-process — instant response.","source":"DIY heuristic (cl100k_base-shaped)"},"x402_payment_required":true,"x402_facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}