▶ Stepthrough All tutorials Blog Glossary Prompts Videos Visual guides Start Learning Free

What is a token in AI?

Updated · By Robert Breen

A token is a small chunk of text, often a whole short word or part of a longer one, that an AI language model reads and writes. Models count everything in tokens: the length of your prompt, the length of the reply, how much they can hold at once and, for API use, what you are billed.

Why it matters for a small business

Tokens are the hidden unit behind three things business owners notice. Cost: API billing is based on tokens in and tokens out, so long prompts and long replies cost more than short ones. Limits: every model can only handle so many tokens at once. Speed: more tokens to write means a slower answer.

OpenAI's rule of thumb is that a token is roughly three quarters of an English word, so a 100-word email is somewhere around 130 tokens. You never need to count them exactly, but knowing that every word you send is metered changes some habits. A tidy system prompt beats a rambling one, and asking for "under 120 words" is a cost control as well as a style choice.

In a real lesson: Build an n8n AI Agent That Plans Your Content Calendar

In the content calendar agent lesson, you build an n8n agent for Harbor & Pine Coffee Roasters, a made-up coffee brand, then ask it: "Plan a two-week email and social calendar for our Holiday Ember Blend launch, starting Monday Nov 2. Our offer is free shipping over $35."

Tokens add up from several places in that one request. The system prompt you pasted (the brand description, the rule of no more than 2 emails a week, the five fields to return for each item) is sent along every time. Simple Memory adds recent messages, so when you follow up with "Yes, save the calendar to the sheet", the earlier exchange goes along too. Then the reply itself, two weeks of items each with Date, Channel, Topic, Draft Copy and Status, is output tokens.

The lesson's verdict on cost is that planning a calendar costs fractions of a cent with gpt-5-mini. That is true for this size of job. It is also why the system prompt asks for one or two sentences of draft copy per item rather than full posts: shorter output, fewer tokens, faster runs.

n8n AI Agent node with a system message written for Harbor & Pine Coffee Roasters
n8n AI Agent node with a system message written for Harbor & Pine Coffee Roasters

Try this lesson free or read the step-by-step guide.

Common confusions

Token vs word

Common short words are usually one token each, while long or unusual words, names and numbers may be split into several. Spaces and punctuation count too. Word counts are a fine estimate; exact token counts depend on the model.

AI token vs API key

Some people say "token" for an access credential. In AI pricing and limits, a token means a piece of text. The secret you paste into n8n is an API key, a different thing entirely.

Tips

  • Keep system prompts focused; they are re-sent on every request an agent makes.
  • Ask for a length limit in the output when you do not need a long answer.
  • Very long pastes, like full transcripts, use many tokens; trim parts that are clearly irrelevant.

Where you use it: free lessons

Prompt templates that use it

Frequently asked questions

How many tokens is a page of text?
As a rough guide, a token is about three quarters of an English word, so a 500-word page is in the high hundreds of tokens. Exact counts vary by model and language.
Do tokens matter if I use ChatGPT instead of the API?
You are not billed per token on a ChatGPT plan, but tokens still decide how much text fits in one conversation and how long replies take.
Do I pay for the tokens in the AI's reply?
On the API, yes. Both the text you send and the text the model writes count, and output tokens are often priced higher than input tokens.

All AI glossary terms, A to Z · Free prompt templates