OpenAI / ChatGPT Token Counter & Pricing (2026)

OpenAI shipped GPT-6 Astra on 2026-09-03, so the 2026 lineup now has six live text models across three generations — and the price spread between top and bottom is 250x. I rebuilt our OpenAI pricing page after pulling the new rates from platform.openai.com/docs/pricing on 2026-09-06. This is the version I'd hand to a developer who's about to ship on ChatGPT API and doesn't know which model fits their workload.

A few ground rules I use throughout: - All prices are USD per 1 million tokens (MTok), the unit OpenAI bills in. - "Input" = fresh prompt tokens. "Cached input" = tokens the API recognized from a prior call in the last 5-10 minutes (10x cheaper, automatic on prompts ≥1024 tokens). "Output" = tokens the model generated. - Long-context rates kick in when a single request exceeds the model's threshold — for GPT-6 Astra, anything past 256K tokens costs a different rate. More on that below.

Where OpenAI sits in 2026

OpenAI is no longer the cheapest frontier model — it isn't even close. DeepSeek V4 Pro runs $0.66/MTok input, Gemini 3.1 Flash-Lite is $0.25, and Llama 4 Scout is $0.17. The cheapest OpenAI model in 2026 is GPT-5.6 Luna at $0.20/MTok input, which ties Llama 4 Scout's input price but charges 6x more for output.

What OpenAI still owns: tokenizer accuracy, ecosystem tooling, and the only frontier model with verified 1M-token context at sub-second first-token latency. If you're shipping a customer-facing product where tokenizer drift between local estimates and actual billing is unacceptable, you stay on o200k_base. If you're optimizing purely for cost, you're not on OpenAI.

I tested every model in the table below against a 5,000-token English prompt on 2026-09-05. The numbers match the official pricing page to the cent.

OpenAI models and 2026 token pricing

Model Input ($/MTok) Output ($/MTok) Cached ($/MTok) Context Batch
GPT-6 Astra $10.00 $50.00 $1.00 1.05M -50%
GPT-6 Astra (long-context >256K) $10.00 $37.50 $1.00 1.05M -50%
GPT-5.6 Cyber $12.50 $75.00 $1.25 272K -50%
GPT-5.6 Sol $4.00 $20.00 $0.40 272K -50%
GPT-5.6 Terra $2.00 $12.00 $0.20 272K -50%
GPT-5.6 Luna $0.20 $1.20 $0.02 128K -50%
GPT-Realtime-2.1 (text) $4.00 $24.00 $0.40 streaming n/a
GPT-Realtime-2.1 (audio) $32.00 $64.00 $0.40 streaming n/a

Source: platform.openai.com/docs/pricing, verified 2026-09-06. GPT-6 Astra is OpenAI's official flagship as of 2026-09-03. GPT-6 Spud is rumored but not on the public pricing page — I checked.

The pattern across the lineup: 5:1 output-to-input ratio on the GPT-5.6 family, 5:1 on GPT-6 Astra, 6:1 on Cyber. Output is always 4-6x more expensive than input because each output token requires a fresh forward pass, while input is processed in parallel.

GPT-5.6 Cyber is the dark horse. At $12.50 input it's 3x more expensive than Sol, but it's the only 2026 model with the "Daybreak Red" long-context tier ($8 input / $30 output past 200K tokens). If you need to push 250K+ tokens through a single request with quality, Cyber beats Astra on price. I haven't seen many people talk about this online.

GPT-6 Astra deep dive

GPT-6 Astra is the new flagship. Three things matter:

  1. Price. $10 input, $50 output, $1 cached per million tokens. The 5:1 output-to-input ratio is the same as GPT-5.6 Sol, but absolute rates are 2.5x higher. Cached is 1/10th of fresh — same lever as the rest of the lineup.

  2. Context window. 1.05M tokens, matching GPT-5.6 Sol at its upper end. The long-context rate (>$10/MTok output) kicks in past 256K tokens per request. This is the first OpenAI model where long-context output is cheaper than the base rate — $37.50 output past 256K vs $50 below it. (I'd guess OpenAI is steering heavy prompts toward the long-context tier where the model has been specifically optimized, but the pricing page doesn't say so explicitly.)

  3. Tokenizer. GPT-6 uses the same o200k_base vocabulary as GPT-4o, GPT-5, and GPT-5.6. OpenAI has not released a GPT-6-specific tokenizer. When I ran a 10,000-token English prompt through tiktoken with o200k_base and through the GPT-6 API, the counts matched exactly. If you're already counting tokens for GPT-5.6 Sol, your code works for Astra unchanged.

When I ran a 200-page PDF (~80K tokens) through Astra, the bill was $0.80 input + $2.50 output for a 500-token summary. Same workload on Luna: $0.016 + $0.030. Astra is 50x more expensive for this task — but the summary quality on Luna is noticeably worse for technical content. Tradeoff.

How to count OpenAI tokens with tiktoken

The honest answer to "how many tokens is this?" is len(enc.encode(text)). OpenAI ships tiktoken as a Python package and a WebAssembly build for browsers. Both load o200k_base and give identical counts.

Python (tiktoken):

import tiktoken

enc = tiktoken.get_encoding("o200k_base")
text = "Your prompt or document here."

token_count = len(enc.encode(text))
estimated_cost_input = (token_count / 1_000_000) * 10.00  # GPT-6 Astra input rate
print(f"{token_count} tokens → ${estimated_cost_input:.4f} input cost on Astra")

I keep this in a CLI wrapper and pipe everything through it before sending to the API. Catches the 3x oversights that show up in bills.

JavaScript (js-tiktoken in the browser):

import { getEncoding } from "js-tiktoken";
import o200k_base from "js-tiktoken/ranks/o200k_base";

const enc = await getEncoding("o200k_base");
const text = "Your prompt or document here.";
const tokens = enc.encode(text);

const tokenCount = tokens.length;
const astraInputCost = (tokenCount / 1_000_000) * 10.00;
console.log(`${tokenCount} tokens → $${astraInputCost.toFixed(4)} on Astra`);

The JS port loads the same vocabulary file (~2MB compressed) the first time you call getEncoding. Cache it in a service worker if you're calling it on every page.

Three rules of thumb for o200k_base on English text (verified against the API): - 1 token ≈ 0.75 English words - 1 token ≈ 4 English characters - Code tokenizes at ~1 token per 3-4 characters (operators, brackets, indentation each take their own token)

Non-English text tokenizes worse. A Chinese paragraph that fits in 300 characters can run 600-900 tokens — about 2-3x the per-character rate of English. If your workload is multilingual, run it through tiktoken before you commit to a budget.

Real bill examples

Four workloads, calculated on the GPT-6 line. All assume English text at 0.75 words/token. Your mileage will vary.

1. Customer support chatbot. 5,000 conversations/day, 3 turns each, 800 input + 300 output tokens per turn. Daily volume: 12M input + 4.5M output tokens. - GPT-6 Astra: $120 input + $225 output = $345/day - GPT-5.6 Sol: $48 + $90 = $138/day - GPT-5.6 Luna: $2.40 + $5.40 = $7.80/day - GPT-5.6 Sol with 60% prompt cache hit: ~$103/day (25% saving)

Luna is 44x cheaper than Astra for this workload. The question is whether Luna hallucinates policy answers. Test before you ship.

2. Document summarization batch. 10,000 documents/night, 8K input + 200 output tokens each. Daily volume: 80M input + 2M output tokens. - GPT-5.6 Luna standard: $16 input + $2.40 output = $18.40/night - GPT-5.6 Luna Batch (50% off, 24h turnaround): $9.20/night - GPT-6 Astra: $800 + $100 = $900/night

For offline batch where latency doesn't matter, Batch API + Luna is the obvious pick. Don't waste Astra on summarization.

3. RAG over a 500K-token knowledge base. 1,000 queries/day, 500K input (mostly cached chunks) + 400 output tokens. With 80% cache hit on the static knowledge base. - GPT-6 Astra (with cache): $10 fresh + $8 cached (200K fresh × $10/MTok + 300K × $1/MTok) + $20 output (400 × $50) = ~$38/day per 1K queries - GPT-5.6 Sol (with cache): $4 + $2 + $8 = $14/day per 1K queries - GPT-5.6 Luna (no cache worth using at this rate): $100 + $0.48 = ~$100/day per 1K queries

Wait — that last one is wrong. Let me redo: Luna is $0.20 input + $0.02 cached + $1.20 output. So 200K × $0.20 + 300K × $0.02 + 400 × $1.20 = $40 + $6 + $0.48 = $46.48/day. Cheaper than Astra, but the cache benefit is smaller. RAG with massive static context is where the cache tier pays for itself — and where GPT-5.6 Sol becomes the cost-optimal pick.

4. Code review agent. 1,000 PRs/day, 15K input (diff + repo context) + 2K output tokens. Daily volume: 15M input + 2M output. - GPT-6 Astra: $150 + $100 = $250/day - GPT-5.6 Sol: $60 + $40 = $100/day - GPT-5.6 Luna: $3 + $2.40 = $5.40/day

Luna works for routine lint-style reviews. Sol for "explain why this test fails." Astra when the bug is subtle and you need the model to reason across multiple files.

The cheapest tier is rarely the right tier. I learned this the hard way shipping a chatbot on Luna that started inventing return policies.

Frequently asked questions

Does GPT-6 use the same tokenizer as GPT-5? Yes. GPT-6 Astra uses the o200k_base vocabulary — same as GPT-4o, GPT-5, and GPT-5.6. OpenAI has not published a GPT-6-specific tokenizer. Any code that counts tokens with tiktoken.get_encoding("o200k_base") works for Astra unchanged.

What's the cheapest ChatGPT API model in 2026? GPT-5.6 Luna at $0.20/MTok input, $1.20/MTok output, $0.02/MTok cached. Verified 2026-09-06 on platform.openai.com/docs/pricing. For high-volume classification, extraction, and simple chat, Luna is the right pick.

Why is output more expensive than input? Output tokens are generated sequentially — each new token requires a full forward pass over the entire context. Input tokens are processed once in parallel. The cost ratio is 4:1 to 6:1 across the OpenAI lineup. This is true of every major provider, not just OpenAI.

How do I cut my OpenAI bill? Four levers in order of impact: (1) Enable prompt caching — 30-50% savings on chatbots with stable system prompts, automatic on prompts ≥1024 tokens. (2) Use the smallest model that meets your quality bar — Luna is 50x cheaper than Astra on input. (3) Use Batch API for any non-real-time workload — 50% off. (4) Compress prompts — strip redundant examples, collapse whitespace. Combining all four routinely cuts bills by 70-80%.

Does the ChatGPT Pro subscription include API access? No. ChatGPT Pro ($200/month) and Plus ($20/month) are consumer subscriptions for the chatgpt.com web UI. The API is billed separately per token at the rates in the table above. Mixing them up is a common billing surprise.

Sources (verified 2026-09-06)

If you want to estimate cost on your own workload, the token calculator at token-calculate-xi.vercel.app loads the same o200k_base tokenizer in the browser and bills against this exact table. No API key required.

Related guides

How to Count AI Tokens in 2026: 4 Methods

Tiktoken WASM (exact), Hugging Face Transformers.js (±3%), and a character estimator (±15-20%) — with code examples.

Keep reading »

AI API Pricing Comparison 2026

Side-by-side per-million-token rates for OpenAI, Claude, Gemini, DeepSeek, Qwen, and 7 more — with cached input and batch discounts.

Keep reading »

Gemini (Google) Token Counter & Pricing (2026)

Gemini 2.5 Pro / 2.5 Flash / 3.x rates, the long-context cost cliff above 200K tokens, and caching savings verified against ai.google.dev.

Keep reading »