API key
A secret string that identifies you to an AI service and lets your code call it. Whoever has the key can spend your money.
An API key works like a password for programs. You create it in your account, store it in an environment variable or a secrets manager, and your code sends it with each request. Usage is billed to the account that owns the key.
Never put a key in public code, a screenshot or a chat. If it leaks, revoke it at once and create a new one. Set a spending cap, and use separate keys for separate projects so you can cut one off without breaking the rest.
A wrong or missing key causes the common 401 error. See token for how usage is counted.