Foundations · Welcome

Welcome & How to Use This Course

A from-scratch, hands-on path to building real applications with Claude — starting with zero assumptions about machine learning and ending with production-grade capstone projects. This page gets your editor, your account, and your first API call all working before Module 1.

☺ Explain it like I'm 10

Think of this whole course like moving into a new kitchen. First you find the light switches and get the stove hooked up — that's this page: an editor, an account, and a key that lets you cook. Then you follow a recipe book in order, each dish building on the last one's skills — that's the Foundations modules. Once you know the basics cold, you get to cook your own meal with no recipe card at all — that's a capstone.

🦉🐧Your hosts for this topic: Professor Owl (explains how the course fits together) and Pico the Penguin (gets your laptop and your first line of code actually working).

Who this course is for

☺ Like you're 10: You don't need to know how a car engine works to learn to drive it — you just need to know where the pedals are. Same deal with Claude: you call an API, you don't build a brain.

This course assumes no machine learning background whatsoever. You do not need to know what a transformer is, how attention works, or anything about training neural networks — Claude is accessed entirely through an API, and this course treats it that way from the very first line of code.

Basic programming experience is genuinely useful, though. You should be comfortable reading and writing simple scripts in at least one of Python or TypeScript/JavaScript — variables, functions, loops, installing a package. If you can write a script that reads a file and prints something to the console, you already have enough to start.

→ Tip

You're ready if you've written scripts before, you're comfortable with a terminal, and you're curious how to make an LLM call tools, read documents, or hold a conversation.

⌁ Note

Not required going in: a math or ML background, prior experience with any other AI API, or familiarity with terms like "embedding" or "fine-tuning" — every one of those gets introduced exactly when it's needed.

How the course is organized

☺ Like you're 10: It's a video game with a tutorial level, a long main story you play in order, and then open-world bonus missions at the end.

The course has two parts. Foundations (modules 0–20) build up your understanding one concept at a time, in order — from your first API call through prompting, tool use, agentic patterns, retrieval, safety, and evaluation. Capstones (six of them) are larger, open-ended projects where you combine everything into something closer to a real production system.

Module 0Welcome & setup Modules 1–20Foundations, in order 6 CapstonesBuild something real

Foundations are meant to be read in numeric order — later modules assume you've seen the SDK calls, terminology, and patterns from earlier ones. Capstones are more self-directed: each one is a project brief, not a tutorial, and leans on whichever foundation modules are most relevant to it.

→ Tip

Anthropic ships new models fairly often. Code samples in this course use whatever the current generation is at time of writing (for example, claude-opus-5 and claude-sonnet-5), but before you rely on a model name in your own project, check the live Models Overview page on platform.claude.com to confirm it's still current.

Set up VS Code as your reference IDE

This course uses VS Code as its reference editor throughout — screenshots, keyboard shortcuts, and setup steps assume it, though everything you build works the same in any editor. Start by creating a dedicated workspace folder for the course, then open it in VS Code (File > Open Folder, or code . from the integrated terminal if you have the code CLI installed).

A few extensions are worth installing before you write any code:

Inside your workspace folder, create a .env file to hold your API key, and make sure it's excluded from version control:

# from your workspace folder
touch .env
echo ".env" >> .gitignore
ANTHROPIC_API_KEY=sk-ant-api03-your-key-here
◆ Pattern

Keep your key in .env (gitignored) and load it into the environment; both official SDKs read ANTHROPIC_API_KEY automatically, so your code never touches the key directly.

⚠ Anti-pattern

Pasting the key as a string literal into a .py or .ts file. It's easy to commit by accident, and anyone who reads the file can spend your account's quota.

Create a free Anthropic Console account and API key

☺ Like you're 10: An API key is like a house key that also has your name tag on it — it lets you in, and it proves it was you who came in.

The Claude API is separate from the claude.ai chat product — it's the pay-as-you-go developer platform that claude.ai itself is built on. To use it from code, you need an account and an API key.

  1. Go to platform.claude.com and sign in or create an account. (If you land on console.anthropic.com or docs.claude.com, that's expected — both now redirect here; it's a single combined Console-and-docs site.)
  2. Navigate to Settings → API keys.
  3. Click Create key. Give it a name, optionally scope it to a workspace, and choose an expiration — 3 hours, 1 day, 7 days, 30 days, a custom date, or "Never" for a key you plan to store in a secrets manager and rotate yourself.
  4. Copy the key immediately. It starts with sk-ant- and the Console shows it in full exactly once, at creation — if you lose it, you'll need to create a new one.
⚠ Careful

Treat your API key like a password: store it in a secrets manager or a gitignored .env file, never commit it to source control, rotate it periodically, and revoke it immediately from the Console if you ever suspect it's leaked. For CI/CD or production deployments, Anthropic recommends Workload Identity Federation over static keys — it exchanges a short-lived identity token from your existing provider for a short-lived Claude API access token instead of embedding a long-lived secret.

Once you have a key, set it as an environment variable named exactly ANTHROPIC_API_KEY — this is what both official SDKs look for automatically:

export ANTHROPIC_API_KEY="sk-ant-api03-..."

Install Python or Node.js and the official SDKs

This course's examples run in Python and TypeScript/JavaScript side by side — use whichever you're more comfortable with, or follow both. You'll need Python 3.9+ or Node.js 18+ installed before continuing; VS Code's integrated terminal is the easiest place to check your version and run the install commands below.

pip install anthropic
npm install @anthropic-ai/sdk

Both SDKs read ANTHROPIC_API_KEY from the environment the moment you construct a bare client — no explicit key argument required. Here's the smallest possible "hello world" call in each language:

Python
import anthropic

client = anthropic.Anthropic()  # reads ANTHROPIC_API_KEY from env

message = client.messages.create(
    model="claude-opus-5",
    max_tokens=1000,
    messages=[
        {
            "role": "user",
            "content": "What should I search for to find the latest developments in renewable energy?",
        }
    ],
)

for block in message.content:
    if block.type == "text":
        print(block.text)
JavaScript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic(); // reads ANTHROPIC_API_KEY from env

const message = await client.messages.create({
  model: "claude-opus-5",
  max_tokens: 1000,
  messages: [
    {
      role: "user",
      content: "What should I search for to find the latest developments in renewable energy?"
    }
  ]
});

for (const block of message.content) {
  if (block.type === "text") {
    console.log(block.text);
  }
}

Peel back either SDK and there's the same plain HTTP call underneath: a POST to /v1/messages carrying a model, a max_tokens cap, and a messages array of {role, content} objects, with your key riding along in a header. The SDK just saves you from writing that request by hand. The response's content is a list of typed blocks — this example only expects text, so it checks block.type == "text" before reading block.text; later modules cover the other block types (tool use, thinking) you'll see once you start using tools.

→ Tip

In VS Code, run these as Jupyter/REPL cells (Python) or straight from the integrated terminal — both make it easy to iterate on a prompt and immediately see the response without re-running a whole script.

🎬 At the Claude Crew
🦊

Foxy: Wait, do I need to understand transformers and attention before I write my first line of code?

🦉

Professor Owl: Not even a little. Claude is just an API you call — text goes in, text comes back. How it "thinks" can wait for another day.

🦊

Foxy: Okay, but I only really know JavaScript, not Python.

🐧

Pico the Penguin: Doesn't matter — every example in this course runs in both. Pick one, run npm install @anthropic-ai/sdk, and you're already ahead of where I was on day one.

You're ready when…

Check off each of these before moving on to Module 1:

✎ Try it yourself

Create a workspace folder called claude-course, add a gitignored .env with your ANTHROPIC_API_KEY, install the SDK for your preferred language, and run the hello-world script above with your own question in place of the renewable-energy prompt. Confirm you can see Claude's text response printed to your terminal before moving on to Module 1.

🦉 Professor Owl's checkpoint

You should now be able to explain how this course is structured — 21 foundation modules read in order, followed by six open-ended capstones — and you should have a working setup: VS Code, a gitignored .env holding ANTHROPIC_API_KEY, the SDK for your language installed, and one successful hello-world response printed to your terminal. From here, head into What Is Claude to start Module 1 proper.

Check your answers
  1. What are the two parts of this course, and how do they relate? Foundations (modules 0–20) build up concepts one at a time in numeric order, and the six Capstones are larger, self-directed projects that combine whichever foundation modules are most relevant to each one.
  2. Where do you create your API key, and what should you do with it once you have it? Create it at platform.claude.com under Settings → API keys — it's shown in full only once. Store it in a gitignored .env file as ANTHROPIC_API_KEY, never hardcoded in source, and rotate or revoke it if you suspect it leaked.
  3. What does a minimal Messages API call need, and what should you check before reading the reply text? Just a model, a max_tokens cap, and a messages array of {role, content} objects. Because message.content is a list of typed blocks, check block.type == "text" before reading block.text.