Skip to content
Forward Deployed

Forward Deployed
AI Engineering Foundations: sections and modules
T2.2

LLM Provider APIs & Model Selection

Call the OpenAI and Gemini chat APIs directly from Python.

Lessons
6 lessons
By
Sourav Banerjee
Prerequisites
None
6 lessons

Practise 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=None sends 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

Your Progress

How confident are you with this module?

1 means "I could not explain it yet"; 5 means "I could teach it". Rate again any time.

 

Saved in this browser when you leave the box.