Block 1 · Week 2 · The second interface: APIs
API as the second interface
Your UI has a face and no brain. The brain lives on another machine. This week you make the two talk, one request at a time. An FDE spends half the job wiring a customer's systems together, and every one of those wires is a request like these.
The lesson in one line
Every request between two machines carries four things: an address, an action, a key, and a package in a format both sides agree on. Every reply carries two: a code and a package.
01
What this lesson covers
| Round Three | A worked example you can replay: a machine answers every message with a code. Each code forced one part: one sender, then the address, the action, the key, the package. |
| The six parts | Request: address, action, key, package. Reply: code, package. |
| The CRUD quiz | Create, Read, Update, Delete, spelled POST, GET, PUT or PATCH, DELETE. A Google search is a GET; asking an LLM is a POST, because it creates a new reply. |
Read the notes first; they walk through all three in order.
02
Your path this week
- Request Builder: ten steps, about 90 minutes. Real requests to real machines from this site: Read, Create, the real Round Three machine, breaking it on purpose, reading traffic in DevTools, a model on Groq, and where your key should live. Each step has a Python version you can run on your own machine.
- Practice set: produce five things. A 201 from Aarav's service, your break-it table, a Groq 200 with two answers, where your key belongs, and your own API design. Finish it before you start the next lesson.
- Checkpoint: steps 1 to 8 done and a draft of your API table. If a request will not work, write your question in the template there; writing it down usually finds the answer.
03
When you need it
Stuck
Troubleshooting
Search an error, see which part it points to and how to fix it, and how to ask for help.
Guide
Reading the Network tab
Find the six parts in your own requests, then in ChatGPT's.
Guide
Keys
What Bearer means, where a key lives, and what to do the minute one leaks.
Keep open
Kit
Every link and command, the Python bridge, and the words.
Optional deep dive
The Wire
Why a request has exactly these parts: six problems from Morse code to JSON.
04
What comes next
| Block 1 · Week 2 · Building APIs and the backend | Python, requests, Gradio. You stop calling other people's doors and build your own. |
| Block 1 · Week 3 · Databases and domain modelling | Where should the diagnoses live? |
| End of Block 1 · Ship the first system | A live URL in your first customer's hands. |
The door is deterministic. What comes through it is probabilistic.Aarav is your first customer. Getting his door to answer reliably is the first thing you would ship for him.
Back to the roadmap