Definition
An API key is a secret string of characters that identifies who sends a request to an API. The service checks it on every call to decide whether to answer and what that caller may do. It works like a password for software, so it must be kept private and revoked if it leaks.

In this article
Frequently asked questions
What is an API key used for?
To prove who is calling an API. The service uses it to let in only known callers, apply the limits of their plan and trace what each one does. Without it, anyone could send requests.
Is an API key the same as a password?
Not exactly. A password identifies a person who signs in; an API key identifies a program. They are alike in one thing: both are secrets, and anyone who has the key can act as its owner.
Where should I store an API key?
In an environment variable or a secrets manager, never inside code you share, a screenshot or a chat. If you think it has leaked, revoke it and create a new one.
How does an AI agent use an API key?
You give the key to the agent's configuration, and the agent sends it with every request, usually in the Authorization header. From then on, the agent can do what that key allows.
Related guides
- GlossaryAPIAn API (application programming interface) is a set of rules that lets one program ask another program for data or to perform an action. In social media, an API lets software create, schedule or read posts without anyone clicking through the app, using an API key to prove who is asking.Keep reading
- GlossaryAI agentAn AI agent is software driven by a language model that works toward a goal you give it. It plans steps, uses connected systems and checks its own results instead of only answering one question. Agentic AI is the broader idea of AI that takes actions to finish a task, not just produce text.Keep reading
- BlogMCP Authentication: API Keys, OAuth and SafetySend a bearer token in the Authorization header, never in the URL, or sign in with OAuth. MCP authentication explained, with 401 vs 403 and API keys.Keep reading
- GlossaryWebhookA webhook is an automatic message that one application sends to a web address you choose the moment a specific event happens, such as a payment, a new form entry or a published post. Instead of asking repeatedly whether something changed, you are told as it occurs.Keep reading
- GuideSocial media MCP server and API: let your AI agent do the legworkConnect Claude Code, Codex, Cursor or another MCP-compatible agent to Clautia with an API key. Draft, schedule and manage posts by MCP or REST API.Keep reading

