LLM Tools

LLM Tools

Estimate token counts for any text with per-model cost breakdowns across OpenAI, Anthropic, Google, and more. Build multi-turn chat conversations and export as ready-to-run API request JSON for OpenAI, Anthropic, or Gemini. Visually build function/tool-calling JSON schemas for OpenAI or Anthropic tool use.

ModelContextInput costOutput costContext use
openaiGPT-4o
128k — —
openaiGPT-4o mini
128k — —
openaiGPT-4 Turbo
128k — —
openaiGPT-3.5 Turbo
16k — —
openaio1
200k — —
openaio1-mini
128k — —
anthropicClaude Opus 4
200k — —
anthropicClaude Sonnet 4
200k — —
anthropicClaude Haiku 4
200k — —
anthropicClaude 3.5 Sonnet
200k — —
anthropicClaude 3 Haiku
200k — —
googleGemini 2.0 Flash
1M — —
googleGemini 1.5 Pro
2M — —
googleGemini 1.5 Flash
1M — —
metaLlama 3.1 70B
128k — —
metaLlama 3.1 8B
128k — —
mistralMistral Large
131k — —
mistralMistral Small
131k — —

cl100k_base and o200k_base give the exact token count OpenAI's own API would report for that encoding. Non-OpenAI models (Anthropic, Google, Meta, Mistral) use their own tokenizers, so treat counts for those rows as a reasonable approximation rather than an exact match.

LLM Tools

Estimate token counts for any text with per-model cost breakdowns across OpenAI, Anthropic, Google, and more. Build multi-turn chat conversations and export as ready-to-run API request JSON for OpenAI, Anthropic, or Gemini. Visually build function/tool-calling JSON schemas for OpenAI or Anthropic tool use.

Common uses

  • Estimate token count for a system prompt
  • Compare GPT-4o vs Claude cost for a document
  • Build a multi-turn conversation and export as OpenAI JSON
  • Convert a chat to Anthropic Messages API format
  • Build a function-calling JSON schema for an OpenAI tool
  • Generate an Anthropic tool_use input schema

Also searched as

  • llm token counter online
  • gpt token counter
  • claude token counter
  • how many tokens is my prompt
  • llm api cost calculator
  • compare gpt-4o vs claude pricing
  • openai vs anthropic messages format json
  • openai function calling schema builder
  • anthropic tool_use input_schema generator
  • gemini contents format json
  • chat completions json builder

Frequently asked questions

How do I estimate tokens and cost for a prompt?

Paste text into the Token Counter to get a count and a per-model input and output cost estimate across OpenAI, Anthropic, Google, Meta and Mistral models. The Model Comparison tab lists context windows and prices.

Are the token counts exact?

Counts using the cl100k_base or o200k_base encodings are exact for OpenAI models. For Claude, Gemini and other models the figure is an approximation, and prices are approximate and may be outdated.

How do I create OpenAI, Anthropic or Gemini chat request JSON?

Build the conversation in the Chat Format tab and export it as ready-to-run request JSON for each API.

How do I create a function calling schema?

The Tool Schema Builder tab visually builds JSON schemas for OpenAI or Anthropic tool use.

Is my data uploaded to a server?

No. This tool runs entirely in your browser — your input is processed locally on your device and is never uploaded or stored on a server.