Lesson 3 of 6~1 min read
Lesson 2 — Getting Your API Key
You need an API key to talk to Claude programmatically (not through the chat website, but directly from your code).
Lesson 2 — Getting Your API Key
You need an API key to talk to Claude programmatically (not through the chat website, but directly from your code).
Steps:
**Important:** Never put your API key directly in HTML or JavaScript that gets pushed to GitHub. Anyone who sees the file can use your key and run up your bill. For this course we'll handle it safely.
For local testing, you can put the key directly in your code. For deployment, you'll use environment variables (Vercel and Netlify both support this — it takes 30 seconds).