Welcome to Book 8
From servers to APIs and AI — why hosting teams need this now.
In this book
- Explain what an API is and read a simple JSON request/response
- Connect APIs to hosting work — DNS, servers, webhooks, automation
- Describe how large language models (LLMs) generate text
- Understand tokens, context length, and why they affect cost and quality
- Write basic system prompts and scope an AI feature safely
- Compare cloud AI APIs vs self-hosted models on Canadian infrastructure
Why this book exists
Books 1–7 taught you how packets, servers, and cloud fit together. Today almost every panel you click has an API behind it — and many products add an AI layer on top. Hosting and ops teams are asked questions like:
- “Can we add a chatbot to our site?”
- “Why did our OpenAI bill spike?”
- “Can we run the model in Canada instead of sending data to the US?”
This book gives you vocabulary and guardrails — not to make you an ML researcher, but so you can design, host, and budget AI features responsibly.
AI is not magic — it is API calls + statistics + lots of compute. If you understand HTTP and resource limits from earlier books, you are already halfway there.
Workshop Co. — the next problem
Workshop Co.
- Ask
- Owner wants an FAQ assistant on
workshopco.ca— “What classes run in March?” “Do I need experience?” - Constraints
- Canadian customer names/emails must not train public models; budget ~$30/month
- Marcus's job
- Pick API vs self-host, estimate tokens, write a safe system prompt
Before Chapter 2
List three services Workshop Co. already uses that almost certainly expose an API (hint: Book 7).
Examples
- Google Workspace — Gmail/Calendar APIs
- Stripe — payment and webhook APIs
- Calendly — scheduling API
- Swift Host DNS panel — registrar/DNS API (conceptually)