TOKEN
GESTURE

the hidden currency of ai

Every word you send to AI gets chopped into pieces. Those pieces cost money. Let's talk about the chopping.

IT professional exploring how AI systems work under the hood.

01 WHAT'S A TOKEN

not quite words, not quite letters

AI doesn't read words. It reads tokens - little pieces created by an algorithm called BPE (Byte Pair Encoding). The algorithm learned which pieces appear together often, so common words stay whole while rare words get chopped up.

Think of it like Scrabble tiles, but the pieces aren't letters - they're chunks. "The" is one tile. "Antidisestablishmentarianism" is a whole rack. Numbers are especially weird: each digit or pair often becomes its own token.

02 THE TOLL BOOTH

pay per piece

Every API call has a toll. You pay for the tokens you send (input) AND the tokens you receive (output). It's like a highway that charges per axle - more pieces, more money.

Output usually costs 3-4x more than input. Why? Generating text is harder than reading it. A quick question might cost fractions of a cent, but asking for a 2000-word essay? That adds up. The meter is always running.

03 HIDDEN COSTS

some text is more expensive than others

Not all text is created equal. English prose tokenizes efficiently - the algorithm was trained mostly on English. Other languages, especially non-Latin scripts, can cost 2-3x more for the same content.

Code is expensive (all those brackets and symbols). Numbers are weird (digits get grouped strangely). JSON is verbose. If you're cost-conscious, plain English sentences are your friend.

04 THE MEMORY BUCKET

context windows and forgetting

AI has a maximum memory. The context window is like a bucket - everything must fit inside. Your system prompt, the whole conversation history, your current message, AND the response being generated. All tokens, all counted.

When the bucket overflows, old messages spill out. The AI literally forgets the beginning of long conversations. That's why it might "forget" what you discussed earlier. The memory isn't infinite - it's measured in tokens, and there's a hard limit.