All lessons · 44
Path 1 · AI Basics·Lesson 9 of 10

What AI actually costs: tokens, context and how to avoid surprise bills

Tokens and context explained like to a friend, subscriptions vs pay-as-you-go, what free tiers really include, and the three habits that keep your bill at zero or near it.

LevelBeginnerTime~10 min

Nobody reads the pricing page, and then somebody gets a bill they didn’t expect for “just trying things out”. Ten minutes here saves you that evening. By the end you’ll know what you’re actually paying for and how to never be surprised.

Check current pricing — every number here is approximate

Prices, plan names and free-tier limits change every few months. Treat every figure in this article as an order of magnitude, not a quote, and check the current pricing page before you sign up for anything. What never changes is the mechanics below — and those are what keep you safe.

Tokens: the grain everything is measured in

AI doesn’t read words — it reads tokens: small chunks of text, roughly 3-4 characters in English. That figure is for English: the same content in other languages usually takes noticeably more tokens. Everything — your question, its answer, the documents you attach — is counted in tokens, and everything is priced in tokens.

Real tokenizer — type and watch the tokens pile up
8 tokens · 33 characters · ~4.1 chars per token
Explain this to me like I'm five.

same idea, different languages:

EnglishExplain this to me like I'm five.8 tok
RussianОбъясни мне это как для пятилетнего.11 tok
UkrainianПоясни мені це як для п'ятирічки.16 tok

Type your own sentence into the box — something you’d really ask — and watch the counter as you go: it climbs faster than the words you add, because spaces and punctuation ride along with them. Then look at the three rows at the bottom: the same short request costs a handful of tokens in English and roughly double that in Ukrainian, so the same work in another language simply costs more. And the part that matters for your wallet: you are billed per token on the way in and on the way out — the question you send and the answer you get back are both metered, separately.

Two things that surprise everyone:

  • A long answer costs more than a short one. You pay for the output.
  • Attaching a 30-page PDF costs more than writing two paragraphs. You pay for everything the model has to read, too.

If you want the fuller version of this, it has its own lesson: Talking to a Model: Tokens, Context and Sampling.

Context: the model’s working memory

Before you go on

You're twenty messages into a conversation. Why does message twenty-one cost more than message one did?

pick an answer — you get the explanation right away

Context is everything the model can “see” in the current conversation: your messages, its answers, attached files. It has a size limit — think of a desk that fits only so many papers. When the desk is full, the oldest papers get pushed off (or you start a new conversation).

This explains real-life AI behavior: long conversations get “forgetful”, and a fresh chat sometimes feels smarter than an overloaded one. That’s not the model getting worse — that’s the desk filling up.

Where your money actually goes

Follow one request through the machine:

Step through the pipeline
→→→→
1. You type a question

The text you write becomes tokens.

A typical everyday question: 20-100 tokens. A pasted document: hundreds or thousands.

out› Input tokens
1/5

Three ways to pay

Before you go on

You're about to run the same task a hundred times a day on pay-as-you-go. What actually keeps that from turning into a surprise bill?

pick an answer — you get the explanation right away

Free tier Subscription Pay-as-you-go (API)
What it is The real product, with caps A fixed monthly fee A card on a meter, billed per token
Typical cost Nothing Around twenty dollars a month — check the current price Fractions of a cent per thousand tokens — when I last checked
Best for Trying it out, light daily use Everyday work — the sane default Building your own apps, later
Can it surprise you? No No — the fee is a ceiling Yes. This is where surprise bills live
  • Subscription (ChatGPT Plus, Claude Pro, Gemini Advanced and similar): a fixed monthly fee for generous but capped usage. This is what people mean by “around twenty dollars a month”. Perfect for chatting and everyday tasks — and the only sane option for beginners.
  • Pay-as-you-go (API): a card on file, and you pay per token, like an electricity meter. The rates are tiny — a million tokens of a small model runs from cents to a few dollars last time I looked — but it’s also the only one of the three that can run away from you.

How surprise bills actually happen

Never from chatting. The classic ways: an app or script running unattended, an API key leaking online and strangers using it, or a “free trial” that quietly converts to a subscription. Rules: no API key without a spending limit, no card details in random AI apps, and check your subscription list once a month.

What free tiers really include

Free tiers are real products, not demos: everyday questions, images, voice — all work. The caps are on volume (a number of messages per day — or within a window of a few hours; the exact window depends on the plan) and model strength (the very best models are usually paid). Translation: if your use is “a few useful sessions a day”, free covers you completely — that was the whole point of the free tools lesson.

How to read a pricing page in 30 seconds

Four lines matter, everything else is decoration:

  1. Price is per million tokens — because a single token costs a rounding error. Don’t panic at the big number.
  2. Input and output are priced separately. Output usually costs several times more than input. The model’s answer is the expensive half.
  3. Smarter models cost more per token — sometimes ten times more. You often don’t need the biggest one.
  4. Repeated input is often much cheaper. If the same long document is re-read, providers usually discount it. This is why step 2 above doesn’t cost as much as it sounds: the model really does re-read the conversation, but providers cache the part they have already seen and bill it at a lower rate. Long conversations are not as expensive as they look.

There’s a whole lesson on reading a real bill if you go the API route: Pricing and Usage: The Anatomy of Your Bill.

The three habits that prevent bills

  1. Subscription, not API, for everyday use. A fixed fee cannot surprise you.
  2. Every API key gets a spending limit the moment you create it. One minute, closes the whole category of problems.
  3. Check for attached context. Before sending, glance at what you attached — a 200-page PDF you didn’t mean to include is the most common “why is my limit gone” moment.

Steal this: the cost check

Paste this into your assistant when you plan something heavy:

Estimate before you spend
I'm planning to do this with you: [describe the task]

Estimate honestly: roughly how much input and output will this take? Is
this reasonable on a free tier, a subscription, or does it belong in a
pay-per-token setup? If it's expensive — suggest a cheaper way to get 90%
of the result. Remind me if any price you quote might be out of date.

Assistants are surprisingly good at estimating their own costs — when you ask. The last line matters: their price knowledge has a cutoff too.

The takeaway

  • You pay per tokens in, tokens out; context is the growing pile of everything read.
  • Free = capped but real. Subscription = fixed fee for everyday life. API = meter, for later.
  • Every figure here is approximate — check current pricing before you pay.
  • Spending limit on every API key — and no bill will ever surprise you.
Check yourself

You attach a 30-page PDF and ask one question. What does that do to cost?

Which setup can NOT produce a surprise bill for everyday chatting?

Why does a very long conversation start feeling "forgetful"?

You just created your first API key. What is the one thing to do immediately?

Questions?

Got charged something weird, or want someone to sanity-check your setup? Telegram channel — that’s what it’s for.