AI Basics · about 9 minutes · no jargon
What is an API, really?
You have seen the word API in every AI product announcement and every developer job listing. It sounds technical. It is not. An API is a menu, not a machine. It is a way for one program to ask another program to do something, without knowing how the other program works. In nine minutes you will see what an API is, why AI products talk about it, and why you can use one without understanding the code behind it.
Think of a restaurant. You sit at a table. You do not walk into the kitchen and cook the food yourself. You do not know where the pans are, how the oven works, or who is on shift. You look at the menu, you tell the waiter what you want, and the waiter brings back the dish. The waiter is the API. The kitchen is the program. The menu is the list of things you can ask for.
An API is a waiter between two programs. One program says “I want this”. The API carries the request to the other program, which does the work and sends back the result. The first program does not need to know how the second program works. It only needs to know the menu. That is why APIs are everywhere: they let programs work together without being built by the same team or even the same company.
In the box below, step through how one program sends a request through an API and gets a result back. Click the numbers, or press Next step.
This is a simplified picture. A real API would receive the request, run the work, and send back the result, without the caller knowing how the work was done.
What just happened
You followed four steps from checking the menu and sending a clear request to backend processing and receiving a structured result back.
Why it works this way
An API is a contract between two programs. One program says “I will send you a request in this format”. The other says “I will send back a result in this format”. The contract is the menu. The programs do not need to know how each other works. They only need to agree on the menu. That is why an API lets two programs work together without being built by the same team.
Go deeper: why AI products talk about APIs
An AI product is often a model with an API on top. The model does the work. The API lets other programs use the model without building it themselves. That is why so many AI products say “available through our API”. It means you can send a request to the model, get a result, and build your own product on top, without owning the model or the servers. The API is the doorway. The model is the room behind it.
Step 2 · The contract
An API is a promise about the shape of the request and the result
Same shape, every time.
An API is not just a way to send a message. It is a promise about the shape of the message. The request has a fixed format, and the result has a fixed format. That is what makes it reliable. A program can send the same request a million times and get back results in the same shape. The shape is the contract, and the contract is why APIs are used everywhere.
Think of a form at a doctor’s office. The form has boxes for your name, your age, and your symptoms. You fill in the boxes. The form is the same for every patient, and the office knows exactly where to find each piece of information. An API is that form. The shape is fixed, so the program on the other side knows exactly where to look.
Choose an API type below. Each one shows what kind of structured result its contract returns.
Each API has its own contract, and the contract decides the shape of the result. That is why a program can use an API without knowing how the work is done.
What just happened
You compared four API contract examples and saw how a fixed request-and-response shape lets calling programs reliably read the result—or break if that shape changes unexpectedly.
Why it works this way
An API is a promise. The program that calls the API knows what shape to expect, and the program behind the API knows what shape to send. That is what makes APIs reliable. The promise is written down in a document, called the API documentation, and both sides follow it. Without the promise, the two programs could not work together, because each would have a different idea of what the request and the result should look like.
Go deeper: why the contract is written down
The contract is written down in the API documentation. The documentation tells developers what to send, in what format, and what they will get back. Without documentation, no one could use the API reliably. That is why every serious API has documentation, and why the documentation is as important as the API itself. The documentation is the menu. The API is the waiter.
Step 3 · Why AI uses APIs
Why AI products are often built on someone else’s API
The model is the kitchen. The API is the waiter.
Most AI products are not built by training their own model. Training a large model is expensive, slow, and requires a lot of hardware. Instead, most AI products call an API that someone else built, and build their product on top. The model is the kitchen. The API is the waiter. The product is the restaurant that serves the dish under its own name.
Think of a food truck that does not have its own kitchen. It buys the food from a restaurant, serves it under its own name, and adds its own sauce. The food truck is the AI product. The restaurant is the model provider. The API is the deal between them. The food truck does not need a kitchen. It needs the deal.
Slide the control below across 5 integration approaches—from 1 (full custom training) to 5 (direct API call)—to see how setup effort and speed shift.
What just happened
You moved the slider from level 1 (training from scratch) up to level 5 (calling an existing API) and saw how calling an API speeds up building AI features without owning the model.
Why it works this way
Training a large model is expensive because it needs a huge amount of data, a huge amount of hardware, and a team of specialists. Most products cannot afford that. Calling an API is cheap because the model already exists, and the API lets the product use it without owning it. That is why most AI products are built on someone else’s API. The model is the kitchen. The API is the deal.
Go deeper: when it is worth building your own model
Building your own model is worth it when you need something no existing model can do, when you have data that no one else has, or when the cost of calling an API at scale becomes higher than the cost of building your own. For most products, none of those is true. That is why the default is to call an API, and why the companies that build their own models are a small minority.
Step 4 · Why APIs matter to you
Why you can use an API without writing code
The menu is for everyone, not just developers.
You might think APIs are only for developers. They are not. Many products let you use an API without writing a single line of code. You pick the model, fill in a few fields, and connect it to your app or your spreadsheet. The menu is the same. The waiter is the same. Only the way you order changes. A no code tool is just a friendly menu on top of the same API.
Think of a self service kiosk at a fast food restaurant. You do not need to talk to a person. You tap the picture of the meal you want, and the kitchen makes it. The kiosk is the no code tool. The kitchen is the model. The API is what connects them. You do not need to know how the kitchen works to order a meal.
Judge these four statements. Decide whether each one is true or false about APIs.
What just happened
You judged four statements and saw which ones are true. The true ones described APIs as contracts that anyone can use, with or without code. The false ones described APIs as machines you need to understand, or as replacements for the model.
Why it works this way
An API is a contract, not a machine. The contract says what to send and what will come back. Anyone who can follow the contract can use the API, whether they write code or use a tool that writes it for them. That is why APIs are the backbone of most AI products, and why you can use them without knowing how the model works.
Go deeper: why no code tools exist
No code tools exist because most people do not want to write code to use an API. The tool writes the code for them, and presents a friendly menu instead. The API is the same. The tool is just a layer on top, like a waiter who speaks your language. That is why you can use an AI API without being a developer, and why the same API can be used by a developer writing code and a marketer clicking buttons.
Step 5 · The limits
What an API does not give you
The waiter carries the dish. The waiter does not cook it.
An API gives you access to a model, but it does not give you control over the model. You cannot change the weights. You cannot see the training data. You cannot make the model do something it was not built to do. You can only order what is on the menu, the same way you can only order food that is listed in a restaurant menu. That is the limit, and it is why companies sometimes build their own model even when an API would be easier.
Think of a restaurant. You can order from the menu, but you cannot walk into the kitchen and change the recipe. The waiter will bring you what the kitchen makes, and nothing else. An API is the same. It gives you access to the model, but not control over it. That is the trade: convenience in exchange for control.
Answer the three questions below. After each answer you will see why every option is right or wrong.
What just happened
You answered three questions and saw the reasoning behind every option. An API provides convenient access for standard tasks, while custom models matter when unique data or deeper control is required.
Why it works this way
An API gives you access to a model, but not control over it. That is fine for most products, because the existing model already does what they need. It is not fine when you need something no existing model can do, or when you have data that no one else has. That is when the control matters more than the convenience, and building your own model becomes the right choice.
Go deeper: why the API is often the right first choice
An API is usually the right first choice, even for a company that might later build its own model. It is faster, cheaper, and lets the company learn what it actually needs before spending millions on training. Many companies start with an API and only build their own model when the API is no longer enough. Starting with the API is not a compromise. It is the sensible first step.
Step 6 · Prove it
Three questions. Let’s see what stuck.
You have seen what an API is, why the contract matters, why AI products call APIs, why you can use one without code, and what an API does not give you. Now check what you can explain in your own words. These questions are about the ideas, not the numbers.
Answer each one, read the explanation, and then see your result. If you miss one, the explanation tells you where to look back.
What is an API, really?
- A standalone hardware chip
- A bridge carrying requests and results
- A raw training dataset
- A physical server rack
Why does an API contract matter?
- It hides all documentation
- It fixes request and response shapes
- It replaces the backend logic
- It prevents any data transfer
What is a key limit of an API?
- It cannot return results
- It gives access, not full control
- It blocks all no-code apps
- It never takes requests
Your result
What you now know
- An API is a waiter between two programs, carrying requests and results.
- The contract is the shape of the request and the result. It is why two programs can work together.
- Most AI products call an API instead of building their own model. The model is the kitchen. The API is the deal.
- You can use an API without writing code, because the contract is the same for everyone.
- An API gives you access, not control. That is enough for most products, and not enough when you need something no existing model can do.
Get the monthly summary
One short email a month with the best new topics on the site.
No daily mail, no spam. Just a short note when something worth reading is added.
One short email a month. Unsubscribe any time.
Understand AI without the jargon
Get our newest AI lessons by email: how models work, what agents can really do, and how to use AI well.
One short email a month. Unsubscribe any time.