# API key

Canonical page: /glossary/api-key

API keys & secrets glossary, Keys & secrets. API Key: What It Is and How to Keep It Safe

**Short answer:** An API key is a secret string a service issues you so that requests can be traced back to your account and billed or rate-limited accordingly. Anyone who has the key can act as you against that service, so it is treated as a credential, not a public value.

## Why it matters

Most modern services let you scope a key to specific permissions and revoke it independently of your account password. Good practice is one key per app or integration, so a leak only affects that one connection.

## In Claude Keychain

Claude Keychain exists specifically for this category of secret. It stores each API key in the macOS Keychain under a name you choose, and only reveals the value to you, on your own machine, when you ask for it.

## Common questions

**Is an API key the same as a password?**

Functionally similar, but a key is meant for a program to use, not a person to remember, and it can usually be revoked without changing anything else.

**How many API keys does a typical setup need?**

Often several, one for each service, model provider, or integration you connect.

## Related

[ANTHROPIC_API_KEY](/glossary/anthropic-api-key), [API key rotation](/glossary/api-key-rotation), [Hardcoded secret](/glossary/hardcoded-secret)
