An API key is a password for software. When a program sends a question to Claude or ChatGPT without a person typing it, it includes the key, and the company knows whose account to bill. You do not need one to use the chat apps; those come with your plan. You need one when you run a tool that talks to the model directly, or build something yourself. Then you pay per token used, not a flat monthly fee.
Key facts
- $2per million input tokens on Claude Sonnet 5.5, and $10 per million output
- $0.10per million input tokens on Claude Haiku 5.5, the cheap one, for prompts up to 100,000 tokens
- 1place a Claude key is made: the Console, under Settings and then Keys
- 1environment variable the tools read it from: ANTHROPIC_API_KEY
- platform.claude.com, Pricing (model table) and Get started (key creation, ANTHROPIC_API_KEY); read 6 November 2026
Do I need one?
If you open ChatGPT, Claude or Gemini and type, no. Your plan covers it and there is no key anywhere. You need a key in two situations. The first is when a tool you install asks for one: a plugin, a writing app, an automation, a script someone gave you. It is asking because it talks to the model on your behalf, and it needs your account to bill. The second is when you build something yourself and your code calls the model. In both cases the key is how the company knows the requests are yours. Claude Code is the one common tool that can go either way: it signs in with a subscription by default, and uses a key only if you set one.
Where do I get one?
From the developer side of the company, not the chat app. For Claude it is the Claude Console at platform.claude.com, under Settings and then Keys, after you add pre-paid credit. The key is shown once; you copy it and store it. Programs look for it in an environment variable, a named setting on your computer; for Claude the name is ANTHROPIC_API_KEY, and the documentation’s own example is export ANTHROPIC_API_KEY="your-api-key-here". OpenAI and Google have the same shape: a developer console, a credit balance, a key, a variable.
What does it cost?
Per token, in both directions. On Anthropic’s pricing page the day this was checked, Claude Sonnet 5.5 is $2 per million input tokens and $10 per million output; Opus 5.5 is $4 and $20; Haiku 5.5 is $0.10 and $0.50 for prompts up to 100,000 tokens. Work it through for one email. A thousand-word reply is about 1,333 tokens, so on Sonnet it costs about a cent and a third to generate. A hundred such emails is a little over a dollar. The surprise comes the other way: a tool that sends a huge document with every request pays input tokens on the whole document every time. The bill is about volume, not about any single call.
| Model | Input | Output |
|---|---|---|
| Claude Haiku 5.5 (prompts up to 100K tokens) | $0.10 | $0.50 |
| Claude Sonnet 5.5 | $2 | $10 |
| Claude Opus 5.5 | $4 | $20 |



