

Building with LLM APIs
From one API call to a feature you can ship: a prompt kept as code, output your program can trust, answers that stream into the browser, failures handled on purpose, a bill with a ceiling, tests that do not flake and a safe way to change the model.
Watch lesson 01
Free preview01 What one call sends and returns
- Lessons
- 18
- Modules
- 3
- Running time
- ~3.3 hours
- Before you start
- Read TypeScript and JSON
- Free to watch
- 6 lessons
- Last updated
- Nov 7, 2026
Part of
- AI engineer track/Step 2 of 8
[01] Access
[02] Who it's for
- Engineers adding an LLM feature to a real product, not building a chatbot or training models.
- Developers who have called a model API from a tutorial and want to know what it takes to ship one.
- No machine learning background is needed. You should know HTTP, a web server and unit tests.
[03] What you'll learn
- 01Read any LLM API request and response and say what every part does, usage and stop reason included
- 02Keep a prompt in your code with a version, and keep the user's text from acting as instructions
- 03Get output your program can trust: a schema, a stop-reason check and checks on the meaning
- 04Stream answers into a browser through a real server and proxy, with a working Cancel button
- 05Decide for every failure whether to retry, re-ask, degrade or stop, and put a ceiling on the bill
- 06Test a model feature without flaky tests, ship changes behind a flag and move to a new model safely
[04] Syllabus
Module 01
The call
6 lessons/68 min- 0110m
- 028m
- 0311m
- 0410m
- 0512m
- 0613m
Module quiz
5 questions, about 5 minutes
Module 02
The feature
6 lessons/77 min- 07
Streaming, one underline at a time (locked)
13m - 08
Streaming to the browser (locked)
12m - 09
Read the error before you retry (locked)
12m - 10
Nine requests for one tap (locked)
13m - 11
Testing without the model (locked)
12m - 12
A check set of thirty texts (locked)
10m Module quiz
5 questions, about 5 minutes
Module 03
Production
6 lessons/67 min- 13
Token budgets and the bill (locked)
12m - 14
Paying less per check (locked)
9m - 15
A wrong answer is a 200 (locked)
11m - 16
Shipping behind a flag (locked)
7m - 17
When the model changes (locked)
11m - 18
Moving to a new model (locked)
11m Module quiz
5 questions, about 5 minutes
[05] How it's made
The curriculum is curated by karnstack and reviewed by senior engineers in the industry before it ships. Narration is an AI voice (ElevenLabs) reading human-written, human-reviewed scripts. Read how courses are made.