An LLM API key is a secret token used to authenticate requests to a large language model service. It may authorize model usage, and the associated account can incur costs or provide access to configured services. Applications should keep keys on trusted servers, limit their permissions where possible, and avoid exposing them in client code, logs, or agent prompts and memory.
In an attack, a stolen or mistakenly exposed key may let someone make unauthorized model calls or use the account’s resources. Attackers may also incorporate valid keys into automated workflows. Defenders should monitor usage and spending for unusual activity, rotate keys promptly after suspected exposure, and revoke keys that are no longer needed.


