
Do I need an API key for AI? Usually not
Not to chat. You need a key only when an app or plugin asks for one. How to get one from OpenAI, Google or OpenRouter, what it costs, and the risks.
Do I need an API key for AI?
No, not to chat with ChatGPT, Claude or Gemini. Their apps and websites work with a normal account. You need an API key only when another app, plugin or tool asks for one, so it can use an AI model on your account and bill you for each use.
That request usually arrives one of two ways. A tool you've installed (a WordPress plugin, an Obsidian plugin, a smart-home add-on, a writing app) shows a box labeled "API key". Or you've read that paying through the API costs less than a subscription.
What is an API key?
An API key is a long password that lets software use an AI model on your behalf. You create it on a provider's developer site, such as OpenAI's platform, Anthropic's Console, Google AI Studio or OpenRouter, and it's tied to your billing there. Any app you paste it into can spend your credit, and so can anyone who copies it.
Who needs an API key?
You need one if:
- you've installed a tool that has no AI of its own and asks you to bring a key, so you pay the AI provider directly for what the tool uses
- you're building something, such as a website feature, a script or an app
- you want to pay per use and choose your own models, usually through a router such as OpenRouter, which lists hundreds of models behind one key
If you want to ask questions, draft emails or get things explained, you need none of this. A chat app does that with a normal sign-in. The terms on this page are explained in the AI jargon glossary.
How to get an API key
You sign in to the provider's developer site, create a key and copy it. The key is ready at once, but most tools need credit on the account before it does anything beyond a test.
OpenAI
- Sign in at platform.openai.com/api-keys. Your ChatGPT account works here, but the billing is separate.
- Create a new secret key and name it after the app you'll use it in.
- Copy the key and keep it somewhere safe, such as a password manager.
- Add credit under Billing. A free test request works first; anything more needs credit (OpenAI developer quickstart, October 2026).
Google AI Studio (Gemini)
- Go to aistudio.google.com/apikey and sign in with your Google account.
- Accept the terms. For a new user, AI Studio creates a Google Cloud project and a first key automatically.
- If no key appears, create one on the API Keys page. If you already use Google Cloud, you may need to import a project first.
- Copy the key. It starts on the free tier described below.
Source: Google's API key guide, October 2026.
OpenRouter
- Sign in at openrouter.ai/keys.
- Create a key and give it a name.
- Set a credit limit for the key. OpenRouter recommends one on every key, so a leaked key can't spend your whole balance.
- Copy the key, then buy credit, unless you only want the free models.
Source: OpenRouter's authentication docs, October 2026.
Where to paste the key
Open the settings of the app or plugin that asked for it and find the field labeled "API key". It's often under a heading with the provider's name, so paste an OpenAI key under OpenAI and a Gemini key under Google or Gemini, because a key works only with the provider that issued it. Save, then pick a model if the tool asks. If a tool wants an OpenAI-style "base URL" for OpenRouter, it's https://openrouter.ai/api/v1.
Does ChatGPT Plus include API access?
No. API use is billed separately from a ChatGPT subscription, on its own account at OpenAI's developer platform (OpenAI help center, "Is API usage included in ChatGPT Plus?"). Your $20 a month doesn't carry over to a plugin that asks for an OpenAI key, and buying API credit leaves your ChatGPT plan unchanged. Whether Plus itself is worth it is covered in is ChatGPT Plus worth it.
Claude Pro works the same way: API use is paid for separately through Anthropic's Console. Max plans now include $100 to $200 a month of API credit, and Team plans up to $500 a month, pooled, for building on the Claude Platform (claude.com/pricing, 18 October 2026).
Google's Gemini API has its own billing, with a free tier covered below.
How does API billing work?
Mostly prepaid. You load credit first, each request draws it down, and requests stop when the balance reaches zero.
| Provider | How you pay | Worth knowing |
|---|---|---|
| OpenAI | Add credits on the developer platform | A free test request works first; anything more needs credit |
| Anthropic | Prepaid usage credits in the Console | Optional auto-reload when the balance falls below a level you set |
| OpenRouter | Prepaid credit, one balance for every model | 5.5% fee on card top-ups ($0.80 minimum); unused credit can expire after a year; optional spending cap on each key |
Sources: OpenAI developer quickstart, Anthropic help center, OpenRouter docs, all October 2026.
Prices are set per token. A token is a piece of a word, and 1,000 tokens is roughly 750 English words. You pay for the text you send (input) and the text the model writes back (output), and output costs more.
How much does one message cost?
Very little for a short question, and much more deep into a long chat. Each new message resends the whole conversation so far, so the input you pay for grows with every turn.
| Model | Price per million tokens (input / output) | A short question | The same question 50,000 tokens into a chat |
|---|---|---|---|
| DeepSeek V4.1 Flash | $0.30 / $1.20 (peak price) | about 0.1 cent | about 1.6 cents |
| GPT-6.1 Sol | $2 / $10 | about 0.7 cents | about 11 cents |
| Claude Opus 5.5 | $4 / $20 | about 1.5 cents | about 21 cents |
OpenRouter list prices, 18 October 2026. DeepSeek's figure is its weekday peak price. DeepSeek's own API charges half that outside peak hours, and some OpenRouter hosts charge less. A short question here is about 200 tokens in and 700 tokens (around 500 words) out. The long-chat column adds 50,000 tokens of earlier conversation and pasted text, about 37,000 words. Some providers discount repeated text through caching, which these figures leave out.
At the peak price, 300 short questions to DeepSeek cost about 27 cents. The same Opus question costs about 14 times more once the chat is long.
What an API setup costs in a real month
I run Hermes, a desktop chat app, on my own OpenRouter key for my everyday chat. The month from 16 August to 15 September 2026 came to about $49:
| What | Cost (US$) |
|---|---|
| DeepSeek V4 Flash (everyday chat) | $10.00 |
| GLM 5.3 Flash (everyday chat) | $8.90 |
| Kimi K3 | $4.80 |
| Gemini 3.7 Flash | $1.93 |
| An older DeepSeek V4 Flash version | $0.37 |
| Image models (Nano Banana Pro, Seedream, FLUX) | $6.34 |
| Other models, not broken out | about $17 |
| Total | about $49 |
The two models I use for everyday chat came to $18.90 for the month, a little under ChatGPT Plus. The total also includes image generation, so it doesn't line up with any single chat plan.
I'm a technical person and comfortable with keys, credit and choosing models. Routers and API keys are built for people like that, and they're no good for the everyday person. For someone who isn't technical, the saving isn't worth the setup.
The risks: leaked keys and surprise bills
Paste a key only into tools you trust, and keep it out of shared documents and public code, because whoever finds it can spend your credit. Make a separate key for each app, so you can delete one without breaking the others, and delete any key you think has leaked.
Prepaid credit limits a surprise bill, because requests stop at zero. Auto-reload removes that stop, so turn it on only with an amount you're comfortable losing. OpenRouter lets you set a spending cap on each key. Long chats and strong models are what make a balance fall fast, as the table above shows.
Is there a free AI API key?
Yes, with limits. Google's Gemini API has a free tier for several models, and Google may use what you send on that tier to improve its products (Gemini API pricing page, October 2026). OpenRouter lists about 15 free models, capped at 50 requests a day, or 1,000 a day once you've bought $10 of credit (OpenRouter docs).
Should you use an API key instead of a subscription?
If you're technical and curious, a router and your own key let you use any model at pay-per-use prices, and the bill can come in under a $20 plan. If you want answers without the setup, a chat app at a flat price does the same everyday job with nothing to configure. The best cheap ChatGPT alternatives compares the low-cost options.
Plainly is one of those apps: $5 a month, unlimited chat, in the browser. Plainly runs one capable open-source model and switches when a better one comes out. You never pick. It offers no API access, so it can't supply a key for a plugin. Whether it suits you is covered in is Plainly for me.
Frequently asked questions
Is it safe to give an app my OpenAI API key?+
It's as safe as the app you give it to. Anyone holding the key can spend your credit, so make a separate key for each app, set a spending limit where the provider offers one, and delete the key on the provider's site when you stop using the app.
What happens when my API credit runs out?+
Requests stop until you add more. On OpenRouter they fail with a 402 Payment Required error, and OpenAI and Anthropic also run on prepaid credit. If you turn on auto-reload, the provider tops up your balance automatically, which removes that stop.
How many words is 1,000 tokens?+
About 750 English words. AI providers price API use per million tokens and charge separately for the text you send and the text the model writes back. Output usually costs four to five times as much as input.
Does Claude Max include API credits?+
Yes. Claude's pricing page lists $100 a month of API credit with Max 5x, $200 with Max 20x, and up to $500 a month of pooled credit on Team plans. The credit is for building on the Claude Platform through the API, on top of the chat usage the plan includes.
Is OpenRouter cheaper than ChatGPT Plus?+
It can be. My two everyday chat models cost $18.90 for the month to 15 September 2026 through OpenRouter, just under Plus at $20, though a frontier model or long chats would cost far more. OpenRouter also charges a 5.5% fee when you buy credit by card.
Tom Hill · Works at an AI startup
Writes about cheap AI models and honest AI tooling. About the author.
Ready to try Plainly?
A clean, simple place to ask. $5 a month. Unlimited chat. Cancel any time.
Start now