The Doorway Between Programs
An API is the doorway one program uses to ask another for something. It is how the frontend talks to the backend — and how your code talks to a model. Learn this once, and most of software fits together.
You Ask, It Responds
Most web APIs follow a style called REST. You send a request to an endpoint; you get a response back.
- An endpoint is a URL plus a verb — a specific thing you can do
- GET reads data · POST creates it
- PUT replaces · PATCH edits · DELETE removes
- Each response carries a status code — 200 means OK, 404 means not found
Everyone Speaks JSON
JSON is the data format both sides agree on. It is a simple key/value shape — a label, then its value — that any language can read and write.
Keys & Limits
Both matter the moment you call a paid model API.
What a Service Is
A service is a backend with no screen of its own — no buttons, no pages. Other programs call it over its API and do something with the answer.
Build It
How to implement: write out one endpoint your tool needs, in the shape “VERB /path → returns what.” For example: POST /tasks → the created task. That one line is a contract between two programs.
- Weekly AI Tasks tracker — the messaging app delivers messages to your backend via a webhook (an endpoint it calls); the LLM is reached over its API. Watch auth and rate limits.
- Personal brand site — if static, it may call no APIs at all; if it generates anything at build time, that is one API call you make once.
What you learned
An API is a doorway; REST endpoints are URL-plus-verb; JSON is the shared data format; keys prove who you are and rate limits cap how often you call; a service is a backend other programs reach — an LLM provider being the one you will use most.