LLM API Mastery
No frameworks. Raw HTTP/SDK calls only. Everything an agent does reduces to these mechanics: the message array, tool calling, structured outputs, thinking & effort, streaming, multimodal input, tokens, and robust error handling.
- ▸Explain and implement the chat message format (system/user/assistant/tool roles) from memory
- ▸Implement tool calling end-to-end: schema → model emits call → you execute → return result → model continues
- ▸Produce validated structured outputs with JSON schema and recover from malformed JSON
- ▸Stream responses token-by-token and explain why streaming matters for agent UX
- ▸Count tokens, estimate cost per call, and reason about context-window budgets
- ▸Handle rate limits, timeouts, and refusals with exponential backoff and graceful degradation
- ▸Enable adaptive thinking, tune effort, and explain why frontier models replaced sampling parameters
- ▸Send images and PDFs as content blocks and combine document input with structured outputs for extraction
Lessons
Best external resources
Curated reading, docs, and tools that pair with this module.
The canonical reference for the message shapes used in Lab 01.
DocsCompare the two vendors' shapes — interviews ask about both.
DocsChat Completions vs. Responses API, side by side — interviews still ask about both surfaces.
DocsRunnable notebooks for every pattern in this module. Run the tool-use ones.
RepoReference for prompting techniques; skim the basics, bookmark the rest.
GuideThe other vendor's runnable examples — structured outputs, function calling, streaming.
RepoThe best book-length treatment of this whole curriculum; chapters 1–2 pair with this module.
Book