What is an API key? An explanation for non-programmers
An API key is a secret code that lets a program use ChatGPT, Claude or Gemini on your account. What it is, where you create one and five rules to handle it safely.
Lees in het Nederlands →
An API key is a long secret code that lets a program sign in to a service such as ChatGPT, Claude or Gemini. Whoever has the key can use that service on your account. So treat it like a bank card without a PIN: don't share it, store it safely and block it the moment you have doubts.
Sooner or later you'll get the question. A supplier building a chatbot, a colleague who wants to connect something in n8n or Zapier, or a tool that says: "paste your API key here". What is an API key, and what should you do with it? In this article I explain it without programming jargon, with five rules to handle it safely. Status as of 20 November 2026.
What is an API key?
An API is the "back door" of a software service: the way programs talk to each other, without screens or buttons. An API key is the badge that lets a program through that door. The service sees from the key who is knocking, and charges the usage to your account.
Google calls API keys "bearer credentials": whoever holds the key gets in. Nobody asks who you are or where you are. That is why Google also warns that a leaked key can lead to unexpected charges on your account or to someone else accessing your data.
How is it different from your normal login?
With your login (email and password, preferably with two-step verification) you, as a person, sign in to the ChatGPT, Claude or Gemini app. With an API key, a program signs in. Those are two separate worlds:
- A subscription such as ChatGPT Plus or Claude Pro is paid monthly, for use in the app.
- The API is paid separately, per use (per million tokens). Your subscription doesn't count towards it.
That surprises a lot of people. An OpenAI API key only works once you also put credit on your API account. How that works is explained in my article on topping up your OpenAI account.
Why does a tool ask for your API key?
A tool that uses AI itself (a chatbot on your website, an automation in n8n, a plug-in in your CRM) has to call that AI somewhere. Either the supplier pays for it and passes the cost on, or the tool uses your key and you pay OpenAI, Anthropic or Google directly.
The second option isn't bad: you see exactly what it costs and you stay in control. But it does mean you hand over a piece of your wallet. So choose consciously who you give it to.
Where do you create an API key?
Every vendor has its own place. Status as of 20 November 2026:
- OpenAI (ChatGPT): in the dashboard at platform.openai.com/api-keys. The step-by-step guide is in How do you get an OpenAI API key?.
- Anthropic (Claude): in the Claude Console at platform.claude.com/settings/keys. You choose an expiry date for the key yourself, and you can use separate workspaces per application.
- Google (Gemini): in Google AI Studio at aistudio.google.com/apikey. The key belongs to a Google Cloud project. Since 28 May 2026, AI Studio automatically creates new keys as so-called auth keys, bound to a service account.
Five rules for handling an API key safely
1. Never just share it
Not by email, not in Teams or WhatsApp, not in a shared document. If a supplier needs to work with it, let them enter the key in your account themselves, or create a separate one for them (see rule 3).
2. Never put it in code or on a website
A key doesn't belong in the code of your website or app, and certainly not in a public GitHub repository. Google says it literally: "Never check API keys into source control systems like Git." The key belongs on a server, in a so-called environment variable (OpenAI uses OPENAI_API_KEY for this, Google GEMINI_API_KEY) or in a vault such as Google Cloud Secret Manager.
3. One key per person and per application
Google recommends separating keys per team member and per application. That way you know who uses what, and after a leak you only replace one key instead of shutting everything down. At Anthropic you can use workspaces for this, at Google separate projects.
4. Restrict the key and monitor usage
A key that can only do what's needed does less damage when it leaks. In Google AI Studio you restrict a key to the Gemini API. In the Claude Console you set a maximum monthly amount (spend limits). At Google you set budget alerts in the Google Cloud console. Also check usage now and then: a sudden spike is often the first sign of abuse.
5. In doubt? Revoke it immediately
Do you think a key has leaked, or does a supplier no longer work for you? Create a new key, put it in the application, and then disable or delete the old one. Google also recommends renewing keys periodically and deleting unused ones. A key with an expiry date, as at Anthropic, partly does that for you.
My opinion?
An API key isn't a technical detail for the IT department. It's a means of payment. Whoever has it drives around at your expense. I'd advise every business owner to agree on the five rules above with their team, and to ask for every new integration: who has the key, what can it do, and how do we revoke it?
The good news: you don't need to be a programmer. A separate key per tool, a monthly limit and a fixed place to store them, and you're already safer than most companies. And if you're worried about what happens to your data through the API, be sure to read Is my data safe when using the OpenAI API? 😉
Frequently asked questions
What does API key mean?
An API key is a secret code that gives a program access to a service through its API. The service recognises you by the key and charges the usage.
Is an API key the same as a password?
Almost. The big difference is that there's no second step: no code on your phone, no extra check. Whoever has the key gets in. That's why you should be even more careful with it than with a password.
Does an API key cost money?
The key itself is free. Using the API does cost money, per use, separately from your ChatGPT, Claude or Gemini subscription. Google offers a free tier for some Gemini models.
Sources
- Best practices for managing API keys (Google Cloud)
- Using Gemini API keys (Google AI Studio)
- Developer quickstart (OpenAI)
- API overview (Anthropic)
