Part I · Foundations
Chapter 03
Working with Model APIs
How a request reaches a model is decided in an afternoon, usually by whoever writes the prototype, and it constrains everything for two years — decided here three times: good, better, best.
Deliverable: A provider gateway — one seam, one normalised result — with router, cache, ledger and a degraded path.
What's inside
7 topics
- 3.1Configuring Your OpenAI Account
- 3.2Invoking OpenAI APIs with Python
- 3.3Creating and Setting Up a Google Gemini Account
- 3.4Using Gemini Through OpenAI-Compatible APIs
- 3.5Streaming Responses and Token Accounting
- 3.6Retries, Timeouts and Error Handling
- 3.7Multimodal Inputs: Sending Images to an LLM
Preparing PDF viewer…
A note on this content
The book and its chapters are my personal learning notes — compiled from online research and hands-on practice, with most of the content AI-generated from that research and learning. It is not a peer-reviewed publication, and I make no claim that it is 100% error-free. If you spot a mistake, I'd genuinely appreciate hearing about it — contact me.