AI Engineering Foundations: sections and modules
LLM Provider APIs & Model Selection
Call the OpenAI and Gemini chat APIs directly from Python.
- Lessons
- 6 lessons
- By
- Sourav Banerjee
- Prerequisites
- None
Lessons
Start modulePractise and Check
- Deliverable
- Generator choice: answer 20 questions with a fast model, a reasoning model at two effort levels and an open model, and record accuracy, latency and cost per answer.
- Assessment
- Answer the five Interview questions without notes, then run the lab.
- Interview probe
- Larkspur moves its answer generator from `gpt-4o-mini` to `o4-mini`. The monthly bill triples, yet the answers in the transcripts are the same length as before. Where did the money go, and how do you show it?
- Common mistakes
- Assuming
token=Nonesends an unauthenticated Hugging Face call - Estimating a reasoning model's cost from its visible reply
- Raising reasoning effort when the answer needs a missing fact
- Assuming
Your Progress
Saved in this browser when you leave the box.