Glossary · Phase 0 · Tools
API key
A secret password-like string that identifies you to an API. Never share it or put it in code.
An API key is a long random string that identifies your account to an API, something like
sk-ant-api03-Xk2.... Every request you send carries it. That way the provider knows whose request it is, what that account may do, and who to bill.
Try it now
Programs started from this terminal can now read GRADIENT_API_KEY. Close the window and it's gone.
Learn it properly
API keys and secrets · Authenticate safely and keep keys out of your code. About 25 minutes.
Other terms from the same lesson
- environment variable: A setting stored outside your code, often used to keep secrets such as API keys out of files.
Never trained an AI?
Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.