What is an API key?
An API key is a secret code that lets a program use an online service, such as an AI model, and tells the service whose account to charge.
In real life
Like a hotel key card: it opens the right doors, but anyone who finds it can use it too, so you keep it safe and cancel it if it's lost.
Try it yourself
Your weather app
Each request sends your key, so the weather service knows it's you.
- No requests yet.
Your weather service account
Your API key
wx_live_••••••7f3aActive
Requests this month12 of 1000
Your key works like a hotel key card: it opens the door for your app, and anyone holding it gets in too.
Where you will use this
- Track 2, lesson 11: Secrets and environment variablesComing soon
- Module 8: Staying safeComing soon
Quick check: API key
Question 1 of 3