Module 4 of 11

Working with LLM APIs

Lessons

About This Module

A prompt only becomes a product feature once your code can send it to a model and use the answer. This module covers the step where that happens: calling a large language model through an API from your own application, instead of typing into a chat window.

It starts with the basics of a first request: creating an API key, keeping it out of your code, and sending a message to the model. It then looks at how a provider such as Anthropic structures messages, and at managing prompts and conversation history, since the API does not remember earlier turns for you. It finishes with streaming, which lets your interface show the answer as it is generated.

Watch the lessons in order, then continue on to Structured Outputs & Tool Use.

Lessons

4 videos
01

How to Use the OpenAI API with Any Python Project

Setting up the OpenAI API in Python, from getting your API key to making your first request.

02

Claude API Crash Course for Beginners

A tour of the Anthropic Console, getting an API key, installing the SDK, passing messages to Claude, sending images, and moving your key into environment variables.

03

OpenAI with Python: A Step-by-Step Guide for Beginners

Installing the openai package and building a basic system for managing prompts and responses in your own code.

04

Streaming OpenAI Chat Completions Using React and Node JS

How to build an endpoint on a Node server that streams a chat completion back to the browser, so users see the answer as it is generated.