Phase 0 · Tools · Talking to APIs
Your first LLM call
Send messages to a model and read its reply, tokens and stop reason.
Why it matters
Every AI product you've used, from chat apps to writing assistants to agents, is built on the request you're about to send. The chat window is a website making this exact HTTP call on your behalf. Once you can make it yourself, you can put a model inside any script, spreadsheet export or workflow, and everything in Phase 1 builds on this one call.
What you'll be able to do
- Send a request to a model with a system prompt and a user message
- Pull the reply text out of the response, whatever blocks it contains
- Check stop_reason and token usage before trusting a reply
- Continue a conversation by sending the whole history
Before this lesson
Next in this phase: Capstone: ad-copy reviewer