Open and closed models

Underneath, a model is a large pile of trained weights (the numbers it learned during training) that predicts the next token. This chapter is about the two ways those weights reach you, closed models you rent through an API and open-weight models you can run yourself, and about where each one actually runs. The default everyone is pointed toward is a hosted closed model, and providers have little reason to highlight the alternatives, so it is worth knowing the full menu and when each part of it matters.
Open weights, closed weights
There are two ways you can get your hands on an AI model, and the difference comes down to where the model actually lives.
The first way is a closed model, sometimes called proprietary. You reach it only through the company's API, which is a kind of online doorway: you send in text, you get text back, and that is the whole arrangement. The model's weights, the giant pile of trained numbers that make it work, stay locked away on the company's servers. You are renting access, not owning anything.
The second way is an open-weight model. Here the company publishes those weights, so you can download your own copy and run it on hardware you control. Think of it as renting an apartment whose wiring you will never be allowed to see, versus owning a copy of the building's plans.
Most people start with a closed API because it is the easiest front door to walk through, and that is a fine place to begin. The open option is real and worth knowing about, so you understand that renting is a choice and not the only path.
Where the model runs
There is a belief floating around that picking an open model means you have to set up your own servers and run the thing yourself. That is not true, and it is worth clearing up early.
A model can run in one of two places. With a hosted model, some company runs it on their machines and you reach it over the web with an API call, which is a small request your code sends out and gets an answer back from. You never touch the computer it runs on. With self-hosting, you run the model yourself, on your own computer or your own server.
Here is the part people miss. An open model does not force you into self-hosting. You can use an open model through a hosting company the same comfortable way you use a closed one: you send a request, you get an answer, and someone else keeps the machine running. Self-hosting is an option you can take, not a rule you have to follow.
When each one makes sense
Here is a simple way to hold the whole choice. A closed, hosted model is renting: there is nothing to set up, you get the best quality available, and you pay a little each time you use it. An open model that you run yourself is closer to owning: you get more control and more privacy, and there is no per-use bill going to a provider, but you take on the work of keeping it running.
Most people are right to start by renting through an API, and most never need anything more than that. Renting first is the normal, sensible path.
The point of this chapter was not that you should switch to running your own. It was only that you should know the choice is yours, so that if your needs change one day, you will recognise the option for what it is.
With a model chosen, the next question is how you talk to it. The next chapter, Prompting, is about steering whatever model you land on so it gives you what you actually want.

