Skip to content
trending

Guides

AI Tokens: What They Are and How Much They Cost (API Calculator)

A token is a piece of text that models use to process your input and generate output. API pricing ranges from $0.10 (GPT-6 Luna) to $50 per million tokens.

By 13 min read
AI Tokens: What They Are and How Much They Cost (API Calculator)

👁 117 reads

A token is a piece of text that the model splits your question and its answer into. In the API, you pay separately for input and output tokens, with rates quoted per million tokens: from $0.10 (GPT-6 Luna) to $50 for output from the most expensive models. Below you’ll find a cost calculator, current pricing table as of October 4, 2026, and our measurement of how many more tokens Polish text consumes. This is part of the AI API from scratch learning path; we expand on the token definition itself in What is a token in AI and how many characters is it.

As of October 4, 2026

  • Cheapest viable models: GPT-6 Luna 0.10 / 0.50 USD, Gemini 2.5 Flash-Lite 0.10 / 0.40 USD, Mistral Small 4 0.15 / 0.60 USD per million input / output tokens.
  • Mid-range: Claude Sonnet 5.5 and GPT-6.1 Sol at 2 / 10 USD, Gemini 3.8 Flash 0.75 / 3.75 USD (promotional price through end of 2026).
  • Most expensive: GPT-6 Astra and Claude Fable 5.1 at 10 / 50 USD.
  • Polish costs more: in our measurement, the same paragraph in Polish took 1.38 to 2.11 times more tokens than in English.

What is a token in practice

The model doesn’t see letters or words, only numbers representing text chunks from its vocabulary. A common English word is usually one token, while rarer or inflected words break into several. We tested this with the o200k_base tokenizer used by newer OpenAI models:

"""How many tokens does text have in Polish and English, and how much does a query cost."""
import os
import tiktoken
from dotenv import load_dotenv
from openai import OpenAI

PL = "Sztuczna inteligencja zmienia sposób, w jaki piszemy, programujemy i szukamy informacji."
EN = "Artificial intelligence is changing the way we write, code and search for information."

# o200k_base is the tokenizer for newer OpenAI models; other companies have their own, so numbers differ
enc = tiktoken.get_encoding("o200k_base")
for name, text in (("PL", PL), ("EN", EN)):
    tokens = enc.encode(text)
    print(f"{name}: {len(text)} characters, {len(text.split())} words, {len(tokens)} tokens (o200k_base)")
    print("   chunks:", [enc.decode([t]) for t in tokens])

# Real numbers from API: each model counts differently
load_dotenv()
client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=os.environ["OPENROUTER_API_KEY"])
print()
for model in ("openai/gpt-6-luna", "google/gemini-3.8-flash", "anthropic/claude-haiku-4.5", "mistralai/mistral-small-2603"):
    r = client.chat.completions.create(
        model=model,
        messages=[{"role": "user", "content": "Repeat this sentence exactly: " + PL}],
        max_tokens=300,
    )
    u = r.usage
    print(f"{model:30} input {u.prompt_tokens:4}  output {u.completion_tokens:4}  cost {u.cost:.6f} USD")
PL: 88 characters, 11 words, 25 tokens (o200k_base)
   chunks: ['S', 'zt', 'uc', 'zna', ' intelig', 'enc', 'ja', ' zm', 'ienia', ' sposób', ',', ' w', ' jaki', ' pis', 'z', 'emy', ',', ' program', 'ujemy', ' i', ' sz', 'uk', 'amy', ' informacji', '.']
EN: 86 characters, 13 words, 15 tokens (o200k_base)
   chunks: ['Artificial', ' intelligence', ' is', ' changing', ' the', ' way', ' we', ' write', ',', ' code', ' and', ' search', ' for', ' information', '.']

The English sentence: 15 tokens, almost every word intact. The same in Polish: 25 tokens, because “Sztuczna” (artificial) broke into four chunks, and “piszemy” (we write) into three. Inflection and Polish characters mean the tokenizer’s vocabulary less often has a ready chunk for a complete word.

Our measurement: how much more expensive in Polish

One tokenizer isn’t enough, because each company has its own. So we sent the same paragraph (439 characters in Polish, 420 in English) to seven models through the API and read how many tokens each counted. We subtracted the fixed overhead of the conversation template from the result.

"""How many more tokens does Polish use than English? Measurement on real tokenizers through API.
Each model gets the same paragraph in Polish and English; we subtract the conversation template overhead from the result."""
import os
from dotenv import load_dotenv
from openai import OpenAI

load_dotenv()
client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=os.environ["OPENROUTER_API_KEY"])

PL = ("Wczoraj wieczorem próbowałem połączyć swój arkusz kalkulacyjny z modelem językowym. "
      "Okazało się, że wystarczy kilkanaście linijek kodu, klucz API i odrobina cierpliwości. "
      "Najwięcej czasu zajęło mi zrozumienie, dlaczego odpowiedzi przychodzą w formacie JSON "
      "i jak policzyć, ile właściwie kosztuje jedno zapytanie. Teraz automat streszcza mi "
      "codziennie czterdzieści wiadomości od klientów, a rachunek za miesiąc nie przekracza kilku dolarów.")
EN = ("Last night I tried to connect my spreadsheet to a language model. "
      "It turned out that a dozen lines of code, an API key and a bit of patience were enough. "
      "What took me the longest was understanding why the answers come back in JSON format "
      "and how to calculate how much a single request actually costs. Now the automation summarises "
      "forty customer messages for me every day, and the monthly bill stays under a few dollars.")

MODELS = ["openai/gpt-6-luna", "anthropic/claude-sonnet-5.5", "anthropic/claude-haiku-4.5",
          "google/gemini-3.8-flash", "mistralai/mistral-small-2603", "deepseek/deepseek-v4-flash",
          "meta-llama/llama-3.3-70b-instruct"]


def input_tokens(model, text):
    r = client.chat.completions.create(model=model, messages=[{"role": "user", "content": text}], max_tokens=16)
    return r.usage.prompt_tokens, r.usage.cost or 0


print(f"Characters: PL {len(PL)}, EN {len(EN)}n")
print(f"{'model':34} {'PL':>5} {'EN':>5}  PL/EN")
cost = 0
for m in MODELS:
    overhead, k0 = input_tokens(m, ".")
    pl, k1 = input_tokens(m, PL)
    en, k2 = input_tokens(m, EN)
    cost += k0 + k1 + k2
    pl, en = pl - overhead + 1, en - overhead + 1   # "." is one token
    print(f"{m:34} {pl:5} {en:5}  {pl / en:.2f}x")
print(f"nCost of entire measurement: {cost:.5f} USD")
Characters: PL 439, EN 420

model                                 PL    EN  PL/EN
openai/gpt-6-luna                    126    84  1.50x
anthropic/claude-sonnet-5.5          214   121  1.77x
anthropic/claude-haiku-4.5           159    85  1.87x
google/gemini-3.8-flash              116    84  1.38x
mistralai/mistral-small-2603         138    84  1.64x
deepseek/deepseek-v4-flash           145    84  1.73x
meta-llama/llama-3.3-70b-instruct    177    84  2.11x

Cost of entire measurement: 0.00225 USD
Model Tokens PL Tokens EN Polish more expensive by
Gemini 3.8 Flash 116 84 38%
GPT-6 Luna 126 84 50%
Mistral Small 4 138 84 64%
DeepSeek V4 Flash 145 84 73%
Claude Sonnet 5.5 214 121 77%
Claude Haiku 4.5 159 85 87%
Llama 3.3 70B 177 84 111%

Findings you won’t see in price lists:

  • Polish text costs 38% to over 100% more than the same text in English, depending on the model. We tested this in Polish.
  • Claude Sonnet 5.5 counts the most tokens in absolute numbers: 214 for this paragraph, 70% more than GPT-6 Luna. Anthropic itself writes that the new tokenizer (from Claude 4.7) produces about 30% more tokens for the same text. At equal price per million tokens (Sonnet 5.5 and GPT-6.1 Sol both at 2 / 10 USD), the bill for Polish text in Claude will be noticeably higher.
  • Gemini splits Polish most economically of the tested models.
  • For converting words to tokens in practice, we use: 1 Polish word is about 2 tokens in GPT and Gemini, 2.7 in Claude Haiku 4.5, and as many as 3.7 in Claude Sonnet 5.5 (in our paragraph, 58 words yielded 116-126, 159, and 214 tokens respectively). An A4 page of Polish text (1800 characters) is about 500-900 tokens.

The entire measurement (21 queries) cost $0.00225.

Input, output, reasoning and cache

Your query bill consists of several items:

  1. Input tokens - everything you send: system prompt, conversation history, documents, tool descriptions. In a chat with history, this grows with each message because you resend the entire conversation.
  2. Output tokens - what the model generates. Usually 4-5 times more expensive than input (with Kimi K3 even 5 times, at 3 / 15 USD).
  3. Reasoning tokens - reasoning models first “think,” and these tokens are counted as output. In our test, Gemini 3.8 Flash used 462 output tokens for a two-sentence response, of which 390 were reasoning. More examples in 14 thousand reasoning tokens for a kettle description.
  4. Cache reads - when you send the same long query prefix many times, providers count it much cheaper: in Claude 10% of input price (in Opus 5.5 even 5%), in GPT-6.1 Sol $0.10 instead of $2.
  5. Batch mode - if results can wait up to 24 hours, OpenAI, Anthropic and Google charge half price.

How do you check what you actually paid? Every API response has a usage field. The same measurement for four models, with cost returned by OpenRouter:

openai/gpt-6-luna              input   41  output   29  cost 0.000019 USD
google/gemini-3.8-flash        input   30  output  173  cost 0.000671 USD
anthropic/claude-haiku-4.5     input   50  output   34  cost 0.000220 USD
mistralai/mistral-small-2603   input   52  output   28  cost 0.000025 USD

API cost calculator

Enter how many queries you send daily and how many tokens they have. Example buttons set typical scenarios. Remember that with Polish text, token count depends on the model (see table above), and reasoning models add thinking to output.

API cost calculator

Prices per 1 million tokens in USD, excluding VAT, verified October 4, 2026. Calculates in browser, sends nothing.

Compare all models for the same numbers

(function(){var s=atob(“CihmdW5jdGlvbigpewp2YXIgTT1bClsiR1BULTYgTHVuYSIsIk9wZW5BSSIsMC4xMCwwLjUwLCIiXSwKWyJHUFQtNi4xIFNvbCIsIk9wZW5BSSIsMiwxMCwiIl0sClsiR1BULTYgQXN0cmEiLCJPcGVuQUkiLDEwLDUwLCIiXSwKWyJDbGF1ZGUgSGFpa3UgNC41IiwiQW50aHJvcGljIiwxLDUsIiJdLApbIkNsYXVkZSBTb25uZXQgNS41IiwiQW50aHJvcGljIiwyLDEwLCJOZXcgQ2xhdWRlIHRva2VuaXplciBjb3VudHMgUG9saXNoIHRleHQgdXAgdG8gNzAlIG1vcmUgZXhwZW5zaXZlIGluIHRva2VucyB0aGFuIEdQVC4iXSwKWyJDbGF1ZGUgT3B1cyA1LjUiLCJBbnRocm9waWMiLDQsMjAsIk5ldyBDbGF1ZGUgdG9rZW5pemVyIGNvdW50cyBQb2xpc2ggdGV4dCB1cCB0byA3MCUgbW9yZSBleHBlbnNpdmUgaW4gdG9rZW5zIHRoYW4gR1BULiJdLApbIkNsYXVkZSBGYWJsZSA1LjEiLCJBbnRocm9waWMiLDEwLDUwLCIiXSwKWyJHZW1pbmkgMi41IEZsYXNoLUxpdGUiLCJHb29nbGUiLDAuMTAsMC40MCwiIl0sClsiR2VtaW5pIDMuNSBGbGFzaC1MaXRlIiwiR29vZ2xlIiwwLjMwLDIuNTAsIiJdLApbIkdlbWluaSAzLjggRmxhc2giLCJHb29nbGUiLDAuNzUsMy43NSwiUHJvbW90aW9uYWwgcHJpY2UgdGhyb3VnaCAzMS4xMi4yMDI2LCBmcm9tIDIwMjcgMS41MCAvIDcuNTAgVVNELiBHZW1pbmkgMy44IEZsYXNoIGhhcyBkZWZhdWx0IHJlYXNvbmluZzogY291bnRzIHJlYXNvbmluZyB0b2tlbnMgYXMgb3V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ihoKXtoci5hcHBlbmRDaGlsZChub3d5KCJ0aCIsInRleHQtYWxpZ246bGVmdDtwYWRkaW5nOjZweCA4cHgiLGgpKTt9KTt0aC5hcHBlbmRDaGlsZChocik7dC5hcHBlbmRDaGlsZCh0aCk7CnZhciB0Yj1ub3d5KCJ0Ym9keSIpO00ubWFwKGZ1bmN0aW9uKHgsaSl7cmV0dXJuIFt4LGtvc3p0KHgsd2Usd3kpKm4qZG5pLGldO30pLnNvcnQoZnVuY3Rpb24oYSxiKXtyZXR1cm4gYVsxXS1iWzFdO30pLmZvckVhY2goZnVuY3Rpb24odyl7dmFyIHRyPW5vd3koInRyIixTdHJpbmcod1syXSk9PT1zZWwudmFsdWU/ImZvbnQtd2VpZ2h0OjcwMDtvdXRsaW5lOjJweCBzb2xpZCAjMDBiODk0IjoiIik7dHIuYXBwZW5kQ2hpbGQobm93eSgidGQiLCJwYWRkaW5nOjVweCA4cHgiLHdbMF1bMF0pKTt0ci5hcHBlbmRDaGlsZChub3d5KCJ0ZCIsInBhZGRpbmc6NXB4IDhweCIsd1swXVsxXSkpO3RyLmFwcGVuZENoaWxkKG5vd3koInRkIiwicGFkZGluZzo1cHggOHB4IixwbCh3WzBdWzJdKSsiIC8gIitwbCh3WzBdWzNdKSsiIFVTRCIpKTt0ci5hcHBlbmRDaGlsZChub3d5KCJ0ZCIsInBhZGRpbmc6NXB4IDhweCIsdXNkKHdbMV0pKSk7dGIuYXBwZW5kQ2hpbGQodHIpO30pO3QuYXBwZW5kQ2hpbGQodGIpOwp9ClsibiIsIndlIiwid3kiLCJkbmkiXS5mb3JFYWNoKGZ1bmN0aW9uKGspe3EoaykuYWRkRXZlbnRMaXN0ZW5lcigiaW5wdXQiLGxpY3opO30pO3NlbC5hZGRFdmVudExpc3RlbmVyKCJjaGFuZ2UiLGxpY3opOwpsaWN6KCk7Cn0pKCk7Cg==”);var b=new Uint8Array(s.length);for(var i=0;i!==s.length;i++){b[i]=s.charCodeAt(i);}(new Function(new TextDecoder().decode(b)))();})();

Sample monthly costs we calculated with this calculator (30 days):

Model 100 daily emails to summarize (800 / 150 tokens) Chatbot: 500 conversations daily (3000 / 300) Agent: 200 tasks daily (15,000 / 2000)
GPT-6 Luna $0.47 $6.75 $15
Mistral Small 4 $0.63 $9.45 $20.70
DeepSeek V4.1 Flash (peak) $1.26 $18.90 $41.40
Gemini 3.8 Flash $3.49 $50.63 $112.50
Claude Haiku 4.5 $4.65 $67.50 $150
Claude Sonnet 5.5 / GPT-6.1 Sol $9.30 $135 $300
Claude Opus 5.5 $18.60 $270 $600

The difference between the cheapest and most expensive model in the table is 40x. So before you choose a model “just in case the best one,” test 20 real examples to see if a cheaper one will suffice.

API pricing table (October 4, 2026)

Company Model Input (USD / 1M) Output (USD / 1M) Context Price source
OpenAI GPT-6 Luna 0.10 0.50 1.05M OpenAI pricing
OpenAI GPT-6.1 Sol 2.00 10.00 1.05M OpenAI pricing
OpenAI GPT-6 Astra 10.00 50.00 1.05M OpenAI pricing
Anthropic Claude Haiku 4.5 1.00 5.00 200K Anthropic pricing
Anthropic Claude Sonnet 5.5 2.00 10.00 1M Anthropic pricing
Anthropic Claude Opus 5.5 4.00 20.00 1M Anthropic pricing
Anthropic Claude Fable 5.1 10.00 50.00 1M Anthropic pricing
Google Gemini 2.5 Flash-Lite 0.10 0.40 1M Gemini API pricing
Google Gemini 3.5 Flash-Lite 0.30 2.50 1M Gemini API pricing
Google Gemini 3.8 Flash 0.75 (from 2027: 1.50) 3.75 (from 2027: 7.50) 1M Gemini API pricing
Google Gemini 3.1 Pro (preview) 2.00 12.00 1M OpenRouter model card
xAI Grok 4.7 2.00 6.00 500K xAI documentation
DeepSeek V4.1 Flash 0.30 (off-peak 0.15) 1.20 (off-peak 0.60) 1M DeepSeek pricing
DeepSeek V4 Pro 1.32 (off-peak 0.66) 3.96 (off-peak 1.98) 1M DeepSeek pricing
Mistral Mistral Small 4 0.15 0.60 256K Mistral pricing
Mistral Mistral Medium 3.5 1.50 7.50 256K Mistral pricing
Moonshot Kimi K3 3.00 15.00 1M platform.kimi.ai pricing
Z.ai GLM-5.3 1.40 4.40 1M OpenRouter model card
Alibaba Qwen3.8 Max 2.00 6.00 1M OpenRouter model card
open gpt-oss-120b 0.037 0.17 131K cheapest OpenRouter provider

Prices excluding VAT, for standard mode. A few caveats:

  • Long context thresholds: GPT-6 above 272K tokens in a query charges 2x more for input and 1.5x for output, Grok 4.7 above 200K doubles rates (described in The 200 thousand token threshold). Claude from version 4.6 has no surcharge for long context.
  • DeepSeek has time-based pricing: peak is 1:00-4:00 and 6:00-10:00 UTC on weekdays, at other hours and weekends you pay half. Details in the DeepSeek guide.
  • OpenRouter for open models shows one provider’s price, but your query may go to a more expensive one. How to control this is described in The price on OpenRouter is not the price you pay.
  • Detailed pricing: GPT-6 Sol and Luna, Mistral, Kimi, Gemini.

How to pay less for tokens

  1. Match the model to the task. Classification, data extraction and short summaries work on models at $0.10-0.30. Save expensive models for difficult tasks.
  2. Set max_tokens. Cuts off overly long responses and protects against billing surprises (more in API parameters).
  3. Control reasoning. The reasoning_effort parameter (or effort in Claude) set to low can reduce output tokens several times for simple tasks.
  4. Don’t send entire history. In a chat after dozens of messages, summarize or trim older ones.
  5. Fixed query prefix at top. Long system prompt and documents at the beginning, variable part at the end - then cache works.
  6. Batch for overnight tasks. Half price if results can wait.
  7. Calculate locally. At large scale, compare with a model on your own card: Local model or API.

Frequently asked questions

How much does an AI token cost?

A single token costs fractions of a cent: at $2 per million that’s $0.000002. That’s why prices are quoted per million tokens. In October 2026, the range extends from a few cents (cheapest open models) to $50 per million output tokens.

How many tokens is one Polish word?

In our measurement, about 2 tokens in GPT and Gemini models, 2.7 in Claude Haiku 4.5, and 3.7 in Claude Sonnet 5.5. An English word is usually 1.1-1.3 tokens. You can check the exact count for your text in the usage field of the API response.

How much is a million tokens?

In Polish, roughly 1100-2100 A4 pages depending on the model, or several thick books. In English, about 750,000 words.

Why are output tokens more expensive?

The model processes input all at once, in parallel. Output is generated token by token, and each requires a separate pass through the entire model, which takes more time and computing power.

Do tokens in ChatGPT Plus count too?

In chat subscriptions you pay a flat fee, and tokens only affect limits (conversation length, number of messages). You pay directly for tokens only in the API.

Does the calculator account for Polish text?

The calculator computes cost for the given number of tokens. If you’re estimating from word count, multiply by 2 for GPT and Gemini or by 2.7-3.7 for Claude.

Google · Your sourcesQuantslant higher in your Google - one clickAdd to preferred sources →

Sources and verification date

We verified prices on October 4, 2026, on provider websites and in the OpenRouter models API. We performed the token measurement the same day on Windows 11, Python 3.13.15, through OpenRouter.

Kinetyra

// read next

More on this from QUANTSLANT

Piotr Olszewski

Editor and publisher · Quantslant

I edit and publish Quantslant. AI tools help with research, drafts and translation; choosing topics, running the tests, checking facts and the decision to publish are mine, and so is the responsibility for what appears here.

read nextWhat is an API? Explained with AI Examples and Your First curlguidesWhat is an API? Explained with AI Examples and Your First curlAn API is a contract between two programs: one sends a request in an agreed format, the other sends back a response.

Most read

  1. 1Best AI Video Generator Apps for Your Phone (2026)
  2. 2Claude Opus 5.5 Motion Graphics: 60s Showreel from One Prompt
  3. 3Wan 2.2 on RTX 4090: timings, VRAM and four test clips
// site map

This page in other languages1

Quantslant in numbers 1,427posts in archive26news from the last 7 days18video models in the observatory
🎬 AI Video Benchmarks: Higgsfield DoP vs OpenAI Sora • Higgsfield vs Runway Gen-3 • AI Video Credit Calculator
× ‹ enlarge ›