Getting Started· 10 min

Get your API keys

What you'll learn
  • Create an OpenAI key and set a spending limit
  • Create Anthropic and Google keys for Session 6
  • Know where each key lives in your .env file

This page walks through creating API keys for the three providers used in the course. You only strictly need OpenAI for Sessions 1 and 5 — add Anthropic and Google before Session 6.

OpenAI (required for Sessions 1, 5, 6)

  1. Go to https://platform.openai.com/signup and create an account (or sign in).
  2. Add a payment method at https://platform.openai.com/account/billing — a small top-up ($5) is plenty for the whole course.
  3. Open https://platform.openai.com/api-keys and click "Create new secret key".
  4. Copy the key (it starts with sk-...). You will only see it once — paste it into your .env immediately.
Set a usage limit
At platform.openai.com/account/limits set a soft + hard monthly cap (e.g. $10) so a runaway loop cannot drain your card.

Anthropic Claude (Session 6)

  1. Sign up at https://console.anthropic.com
  2. Navigate to Settings → API Keys.
  3. Click "Create Key", copy the sk-ant-... value into ANTHROPIC_API_KEY in your .env.

Google Gemini (Session 6)

  1. Go to https://aistudio.google.com/app/apikey
  2. Click "Create API key" and choose any Google Cloud project (or let it create a default one).
  3. Copy the AIza... key into GOOGLE_API_KEY in your .env.
All three providers offer free starter credits. You should be able to complete every exercise in this course for well under $5 total.