How AI models work, explained simply

Seven short lessons, each with something to try. No maths needed: if you can guess the end of a sentence, you already understand the biggest idea.

1. What is an AI model?

An AI model is a computer program that has read an enormous amount of text and learned one trick extremely well: guessing what comes next.

When you ask a chatbot a question, it writes its answer one small piece at a time. Each time it asks itself, “What is the most likely next piece?” Do that thousands of times and you get a whole answer.

Try it: guess the next word, then see how sure a model would be.

Peanut butter and …

What word comes next? Pick one.

2. What is a token?

Models don’t read letters or whole words. They read tokens: small chunks of text. A short word like “cat” is one token; a long word like “hummingbirds” is split into a few.

A handy rule: 100 tokens is about 75 words. Tokens matter because they are how AI companies measure how much a model reads and writes, and how they charge for it.

9 words became 17 tokens. Short words are usually one token; long words get split into pieces.

3. What is a context window?

The context window is how much text a model can keep in mind at once: your question, the chat so far and any documents you give it. Think of it as the size of the model’s desk.

A small desk fits a few pages. The biggest models today can hold millions of tokens, which is a whole shelf of books. Every model page on AIPortalX lists its context window, and the compare sheet marks whichever is largest.

That is about 320 pages, about one whole novel, that the model can read in one go. Anything beyond that, it simply can’t see.

4. What are parameters?

Inside a model are billions of tiny dials called parameters. While a model learns, each dial gets nudged a tiny bit, again and again, until the model’s guesses get good. Learning this way is called training, and it can take thousands of computers running for months.

More dials usually means a model can learn more, but it also needs more computer power to run. That’s why labs often make a big model and a small, fast one. You can see both on the periodic table of AI.

Once upon a purple sandwich lamp

How sure3%

Before training, the dials are random, so the guesses are nonsense.

5. Open weights or API?

Some labs keep their model on their own computers and let you use it over the internet. That is an API: you send text, the model sends an answer, and you pay for the tokens.

Other labs share the model itself. That is called open weights: anyone can download it and run it on their own computer, or pick from many companies that run it for them. That’s why one open model can have a dozen places to run it, each with its own price.

API

The lab runs the model for you.

  • Nothing to install
  • Pay for each token you use
  • The lab can change or retire it

Open weights

You get the model itself.

  • Run it on your own computer
  • Or rent it from many providers
  • Yours to keep and adjust

6. How much does AI cost?

Using a model through an API is priced per million tokens, with one price for what you send in and a higher one for what the model writes back.

Prices are tiny per message but add up fast. The gap between models is huge: the cheapest can be a hundred times less than the most powerful. Slide the number of messages and watch it change, using real prices from our catalogue. To check any pair yourself, open the compare page.

DeepSeek V4.1 Flash 1017$0.02 in / $0.20 out per 1M tokens
$2.16 /month
Claude Haiku 5.5$0.10 in / $0.50 out per 1M tokens
$6.30 /month
GPT-6.2 Astra$8.00 in / $40.00 out per 1M tokens
$504.00 /month

Assumes 600 tokens in and 300 tokens out per message.

7. Models and tools: what’s the difference?

A model is the engine. A tool is the car built around it: an app with buttons, screens and a job to do, like writing essays, making pictures or summarising meetings. Many tools run on the same few models underneath.

Browse AI models to see the engines, or AI tools to find an app that does the job you need.

  • Homework helper
  • Picture maker
  • Meeting notes

One AI model

Three different apps, one engine underneath. Swap the engine and the app can get smarter, faster or cheaper overnight.