免費線上工具

Token 計數器 · OpenAI / ChatGPT

精準 o200k_base 分詞與 GPT-6.2 Astra / Sol / Terra 成本試算。

運作說明

  1. 1Paste text, code, or JSON into the editor—everything runs offline inside your browser using the o200k_base vocabulary.
  2. 2View exact token counts for OpenAI's current lineup: GPT-6.2 Astra, GPT-6.2 Sol, GPT-6.1 Terra, GPT-6 Luna, and GPT-5.4.
  3. 3Toggle the BPE Token Visualizer to see exactly how numbers, indentation, and camelCase identifiers are split.
  4. 4Compare single-request and 10,000-request pricing against 1,050,000-token context windows, including 90%–95% cached input discounts.

常見問題解答

Do GPT-6.2, GPT-6.1, GPT-6, and GPT-5.4 share the o200k_base tokenizer?

Yes. GPT-6.2 Astra, GPT-6.2 Sol, GPT-6.1 Terra, GPT-6 Luna, and GPT-5.4 all use the 200,000-entry o200k_base BPE encoding, which this tool runs natively in JavaScript.

Are chat message framing tokens included?

This counter measures raw content tokens. When calling the Responses or Chat Completions API, OpenAI adds roughly 3–4 framing tokens per message plus tool schema definitions.

Do reasoning tokens in GPT-6.2 Astra and Sol count toward output pricing?

Yes. Internal reasoning tokens generated before the final answer are billed at the model's output token rate (up to the 128K max output limit). Use the Expected Output Tokens selector to model deeper reasoning budgets.

How much cheaper is OpenAI prompt caching on GPT-6.2 and GPT-6?

GPT-6.2 Astra ($0.40/1M vs $8.00/1M), GPT-6.2 Sol ($0.10/1M vs $2.00/1M), and GPT-6.1 Terra ($0.05/1M vs $1.00/1M) all cut cached input costs by 95%, while GPT-6 Luna drops to $0.01/1M cached.

全部計算器與開發者工具

開發者實用工具 →