The OpenAI SDK, the way production code uses it.
A "hello world" call takes three lines. A feature you can ship needs more: typed output you can trust, tools the model can call safely, streaming, retries, cost control and tests that do not hit the API. This course covers all of it in Python, from the first request to an agent.
The one idea this course is built on
A model call is a stateless function: input items in, output items out, over HTTPS. The model remembers nothing between calls, cannot run your code, and returns text unless you constrain it. Memory, tools, structured data and agents are all things your code builds around that one loop.
You know Python functions, classes, and roughly what a dict or JSON is. Lessons use
Python 3.11+ and the official openai package. Running the examples
needs an API key with billing enabled, which costs cents for this course. The project also has an
offline mode with a fake client, so you can run its tests with no key at all.
Model names, prices and some parameters change every few months. The lessons teach concepts that stay stable (the request/response loop, tools, schemas, retries) and show where to check the current details: the API reference at platform.openai.com/docs and the SDK's changelog on GitHub.
Pick a path
I just need it working
Lessons 02, 03, 05, 06. Setup, the request shape, streaming and typed output.
I am building a feature
Lessons 03, 06, 07, 10, 12, 13. Add tools, embeddings, error handling and cost control.
I want agents
Lessons 07, 08, 15, 17, 18. The tool loop, hosted tools, state, the Agents SDK and evaluation.
Everything, properly
Start at lesson 01 and go in order, then build the project.
Ships with a hands-on project
🛠 A retail analyst assistant
Ask "which category lost the most revenue to returns last quarter?" and get a correct, cited answer. The assistant queries the SQL course's retail database through a read-only SQL tool, returns structured answers, streams its reply, finds products by meaning with embeddings, and tracks token cost per question. It ships with pytest tests that run against a fake client, so they need no key and no network.
Open the project →