Lesson 50 · 2 min
What is an API?
An API is a set of agreed rules that lets one program ask another program for something and get a reply, with no person clicking buttons in between.

When you use a chatbot, you type into a website or app. Programs cannot do that easily, so services also offer an API: a fixed way for software to send a request and receive an answer.
The request is a small, structured message. For an AI model it says which model to use, the instructions, and the text to answer. The reply comes back in the same tidy format, ready for the program to use.
This is how AI ends up inside other apps. A shopping site's help bot, a writing tool in your email, or a translation feature might all send your text to a model's API behind the scenes.
APIs usually need a secret key that identifies the account and is used for billing. Treat it like a password: never post it online or paste it into a public file, because anyone with it can spend money on that account.
Do it now
Spot the APIs around you
- 1. Think of an app that shows weather, maps or payments inside another app.
- 2. Ask a chatbot the prompt below about it.
- 3. Notice how many services you use are quietly talking to each other.
In plain words, with no code, explain how a food delivery app might use APIs to show maps, take card payments and send me text updates. Keep it under 150 words.
Quick check
Words from this lesson
- API
- A doorway that lets one program send requests to another, for example an app asking an AI model for an answer.