API(API)
An API in software, short for application programming interface, is a set of rules that lets one piece of software ask another for information or a service and get an answer back, with no person clicking around. Think of a restaurant waiter carrying your order to the kitchen and bringing your food back.
What an API is in software
Most of the time you use software by looking at a screen: tapping buttons, typing into boxes and reading what comes back. An API is a different door into a program, one meant for other software rather than for a person. Through an API, one program can send a request to another and get a reply back automatically, with nobody clicking anything.
The full name is application programming interface, though almost everyone says API. “Interface” is the useful word here. A screen is the interface people use; an API is the interface programs use to work with each other.
An everyday analogy: the restaurant waiter
Picture yourself in a restaurant. You do not walk into the kitchen and start cooking. Instead, you look at the menu, tell the waiter what you would like, and the waiter carries your order to the kitchen and brings your meal back out.
An API plays the waiter’s role between two pieces of software:
- The menu is the list of things the API lets you ask for. You can only order what is on it.
- Your order is the request one program sends, such as “the forecast for Manchester tomorrow.”
- The kitchen is the other program, which does the actual work out of sight.
- The meal is the answer that comes back.
Like any analogy, this one is not perfect. A real API often needs the program asking to prove who it is first, a bit like showing a booking reference. But it captures the main idea: a clear, agreed way to ask for something without needing to know how the kitchen works.
Examples of APIs you already use
You rely on APIs many times a day without seeing them.
- A weather app. Your phone’s weather app does not run its own weather station. It asks a forecasting service for the latest forecast through an API and shows you the result.
- Logging in with Google. When a website offers “Sign in with Google,” it uses an API to ask Google to confirm who you are, so you do not need yet another password.
- An AI chatbot inside another app. When a shopping site’s help chat answers your questions, or your email app offers to draft a reply, the app is often sending your words to an AI model through an API and showing you what comes back.
How APIs relate to AI tools
When you use ChatGPT or Claude, you type into a chat window built for people. Behind that window sits a large language model, the AI that writes the replies. Developers who want to build that AI into their own apps do not use the chat window. They reach the same kind of model through an API, sending text in and receiving the model’s reply back inside their own program.
That is how AI gets woven into the tools you already use. A spreadsheet that gains a summarise button, or a note-taking app that tidies up your notes, is often passing your text to a model through an API behind the scenes.
You do not need to use an API yourself to benefit from one. If you ever do go further, you will find that settings such as temperature and the choice of model become yours to control, including options like an open-source model or even local AI running on your own machine.