Getting API Keys
::: Prerequisites] Read "API Keys and Pricing" first. You should understand what API keys are and why spending limits matter. :::
Getting an API key from each of the major providers. No code, no terminal, just clicks.
OpenAI API Key
- Go to platform.openai.com and sign in (create an account if needed).
- Click your profile icon in the top right.
- Select "API Keys" from the dropdown.
- Click "Create new secret key."
- Give it a name (e.g., "Make.com" or "Personal use") so you can identify it later.
- Click "Create secret key."
- Copy and save it immediately. You won't be able to see it again after you close the dialog.
- Go to the billing settings for your account and set a spending limit.
Key format: Starts with sk-proj-.
What to watch for: OpenAI's free trial credits expire after a set period. After that, you need to add a payment method.
Note: This is different from your ChatGPT Plus subscription. You need a separate API account at platform.openai.com.
Anthropic API Key
- Go to console.anthropic.com and sign in (or create an account).
- Click "API Keys" in the left sidebar.
- Click "Create Key."
- Name it (e.g., "Automation" or "Testing").
- Click "Create Key."
- Copy and save it immediately. Claude won't show it again.
- Go to Settings > Billing and set a monthly spending limit.
Key format: Starts with sk-ant-.
What to watch for: Anthropic requires identity verification and a payment method before you can use the API. There is no free tier by default.
Google Gemini API Key
- Go to aistudio.google.com and sign in with your Google account.
- Click "Get API key" in the left sidebar.
- Click "Create API key in new project."
- Click "Copy to clipboard."
- Save it somewhere safe.
- (Optional) Go to the Google Cloud Console to set billing alerts.
Key format: Starts with AIza followed by letters and numbers.
What to watch for: Google offers a generous free tier with rate limits. For heavy usage, you'll need to enable billing in Google Cloud.
Storing Keys Safely
Once you have your keys, here's the golden rule:
Treat API keys like passwords.
Do this:
- Save them in a password manager (1Password, Bitwarden, Google Password Manager).
- Name them clearly so you know which service each belongs to.
- Rotate them (delete and create new ones) every few months.
Never do this:
- Paste them in chat windows or emails.
- Save them in plain text files on your desktop.
- Sticky notes on your monitor. (Yes, people actually do this.)
- Share them with AI tools that you don't trust.
Contrast: A password logs you into a website. An API key lets a program act on your behalf. If someone steals your API key, they can make calls and you get the bill.
Never paste API keys in chat windows, emails, or plain text files. Treat them like passwords.
Where should you store your API keys? Name two safe options.
Good Read
- OpenAI API Keys Documentation
- Anthropic Console
- Google AI Studio API Keys
- Best Practices for API Key Safety - OpenAI
Try This Now
Pick one provider (OpenAI, Anthropic, or Google). Go get your API key right now. Copy it into your password manager. Set a $10/month spending limit. Done in 5 minutes.