Guide

OpenAI and Claude API key: where to get one and do you need it

Published 22 November 2026 · 10 min read

An API key is for code, not for chat. WAM Agents runs with no key of yours: the default model is included in your plan, and your own Claude or Codex connects by signing in to your account. Here is how those keys work and where your messages go.

“Use the key you already have”: an open hand holds one worn brass key on a leather strap, next to a steel tray of brand-new uncut key blanks on a warm stone table

The short answer

An OpenAI API key is created on the API keys page of the OpenAI Platform, after you sign in to your developer account and set up API billing. A Claude API key is created in the Claude Console at platform.claude.com, after you add prepaid credits. Each key is a secret string that lets a program send requests on your account, so you store it like a password and never paste it anywhere public.

A key is for code: your own scripts, your app, a tool that asks for one. A subscription such as ChatGPT Plus or Claude Pro is for people who chat. The two are billed separately by both providers, and paying for one does not give you the other.

WAM Agents fits the second case. The default model, DeepSeek, works on every plan with no keys of your own. On Pro you can put your own Claude or Codex behind the same agent by signing in to your subscription with /claude or /codex. Requests then go through your own account with the provider, and for that flow you are the independent controller of your data.

What an API key is, and what it is not

OpenAI's guide puts it in one line: “An API key is a secret credential that authenticates requests.” Your program attaches it to every call, the provider recognises the account behind it and charges that account for the work.

Three things follow from that, and they explain most questions about keys:

  • A key acts on your behalf. OpenAI writes that a user-owned key “acts with its owner’s access”. Whoever holds it can spend your money.
  • A key lives in your environment settings, not in the code. The quickstart tells you to export it as an environment variable, OPENAI_API_KEY, so that the SDK reads it from the system and the key never sits in the code itself.
  • A key is paid per request. You top up a balance or attach a card, and every call takes its share.

A subscription works the other way round. You sign in to an app with your email, pay a fixed monthly price and get a usage allowance inside that app. There is no secret string to copy, and the provider decides how the allowance is counted.

So the honest answer to “do I need an API key” is a question back: are you writing code? If you are, yes. If you want a smart assistant to work for you in a chat, you most likely do not.

How to get an OpenAI API key, step by step

This is the path from OpenAI's own API quickstart and its guide to API keys, checked on 18 November 2026.

  1. Sign in to the OpenAI Platform. It is a developer account, separate from the ChatGPT app, although you can use the same email.
  2. Set up API billing. OpenAI keeps ChatGPT billing and API billing apart, so a ChatGPT subscription does not pay for API calls. Add a payment method in the billing settings of your API account.
  3. Open the API keys page and create a new secret key. For your own experiments a user-owned project key is enough. For an app that runs on its own, OpenAI recommends a service account with its own key.
  4. Copy the key straight into a password manager or your secret storage. OpenAI's guide is strict here: keep secret keys out of browser code, mobile apps, source control, logs and customer-facing responses.
  5. Export it as OPENAI_API_KEY on your computer, as the quickstart shows, and run the first request.

Two habits from the same guide save trouble later. Do not share one developer's key across a team; give each workload its own identity. And rotate keys: issue a new one, switch the program to it, check that it works, then revoke the old one.

People also search for a “ChatGPT API key”. It is the same OpenAI API key: ChatGPT is the app, the API is the developer platform behind it.

How to get a Claude API key (Anthropic)

Anthropic's Get started page gives the path, checked on 18 November 2026.

  1. Create a Claude Console account, or sign in to the one you have. The Console lives at platform.claude.com; the old console.anthropic.com address now redirects there.
  2. Buy credits. According to Anthropic's help article on paying for API usage, API usage runs on prepaid credits: open the Billing page, click “Buy credits”, enter the amount. Credits are available immediately, and when they run out the API stops until you add more.
  3. Create an API key in the Console, on the API keys page.
  4. Store it as a secret, exactly as with OpenAI, and send your first request.

The Claude subscription question comes up here too, and Anthropic answers it in a separate article: Claude paid plans and the Claude Console are separate products, and API usage is billed separately. One exception worth knowing: Max, Ultra and Team plans include monthly API credits, which you claim by linking a Console organization to your plan.

Key or subscription: which one you actually need

Your situationWhat fitsWhy
You write a script or an app that calls the modelAPI keyYour code needs a credential to send requests
A tool you installed asks for “your OpenAI key”API keyThat tool runs the model on your account and your balance
You chat with ChatGPT or Claude in their appsSubscriptionThe app is the product, the plan sets the allowance
You want an AI agent in Telegram to do the workNeither to start withWAM Agents runs on DeepSeek with no keys of your own
You already pay for Claude or ChatGPT and want that model in your agentYour subscription, on Pro/claude or /codex signs you in to it

The last row is where a key and a subscription are easy to confuse, so it is worth spelling out. WAM Agents connects your own model by signing in to your account with the provider (OAuth), not by asking you for a key. Our pricing page describes it as “Your own model: Claude or Codex, with adjustable reasoning depth… Billed by the provider on your own OAuth”. You never copy a secret string into the chat, and you can disconnect your provider with /logout.

How the switch looks in the chat

This is our test agent on 18 November 2026: the status before the switch, /claude, the status after, and the way back to the default. The replies are shortened to the lines about the model.

WAM Agentonline
/status09:41✓✓
Provider: DeepSeek (default)Claude: connected09:41
/claude09:46✓✓
✓ Provider switched to Claude Sonnet 5.5 — let's continue.09:46
/status09:46✓✓
Provider: Claude (in this session)Last switch: deepseek → claude, no turn after it yet.Claude: connected09:46
/deepseek09:54✓✓
✓ Provider switched to DeepSeek V4.1 Flash — let's continue.09:54
Message

Three things are visible here. The sign-in happens once: after that /claude switches in one message, with no key and no code. The status line tells you which provider answers in this chat right now, so you never have to guess where a message goes. And the way back is one command, /deepseek.

The first sign-in follows the Guide: send /claude, open the link, sign in to your Claude account and send the code back to the chat. Codex has its own command, /codex, which authorises by device code right in the chat. The step-by-step walk-through with real tasks is in Claude in Telegram: how to connect your own Claude subscription to your AI agent.

Where your messages go, and who is responsible

Right after the key question comes the next one: “where do my messages go?” The answer depends on which model answers.

On the default model. Requests go through DeepSeek infrastructure in the People's Republic of China, and you confirm this during onboarding. DeepSeek works there on our shared technical key, which is why you need no key of your own.

With your own Claude. Anthropic processes your content when the Claude API is invoked using your own OAuth token. For this flow you are the independent controller of your data: we do not transfer your personal data to Anthropic. Content is then governed by Anthropic's API terms and privacy policy — see the FAQ.

With Codex on your ChatGPT subscription. The same logic: OpenAI processes your content under your own linked subscription, and you are the controller for that flow. OpenAI plays two roles: fallback image understanding and speech synthesis for voice replies on the default model run on our key, while /codex runs on your subscription.

Storage. The journal of your messages — Telegram id, @username, message texts and voice transcripts — is stored in your isolated container at Hetzner in Germany for up to 180 days, so the agent keeps context and finds the files you sent. Only your agent has access to it, and it is not shared with other users.

The full list of contractors your data flows through — with jurisdictions and data categories — lives on the Subprocessors page, updated on 28 October 2026.

If you want the wider picture before you let an agent into your work chats, read Is an AI agent safe? 8 things to check before you let one into your chats and Can you trust AI with your life? Trust needs rules you can see: what it sees, what it sends, what it forgets.

What runs on outside services with any model

Switching the model changes who does the thinking. Some tools keep working through outside services whatever the model, each with its country:

  • message transport via the Telegram Bot API: Telegram (UAE);
  • web search: Perplexity (USA);
  • voice transcription: Deepgram (USA);
  • image generation: Replicate (USA);
  • voice replies with richer voices: MiniMax (Singapore);
  • Gmail, Google Calendar, Docs and Drive connections: Composio (USA);
  • payments: Creem (Estonia).

That is useful to know if a client asks about a specific service.

If you do create a key: five habits

You may still need a key for your own scripts. These habits come straight from OpenAI's guide and Anthropic's billing pages:

  • One key per task. A separate key for each script or app shows you which one spends the money and lets you revoke it alone.
  • Keep it out of code and chats. An environment variable or a secret manager, never a shared document, a screenshot or a message to a colleague.
  • Set a budget. With prepaid credits at Anthropic, an empty balance stops the calls. At OpenAI, watch the billing page of your API account.
  • Rotate. Issue a new key, switch the program, check it, revoke the old one.
  • Revoke what you no longer use. A forgotten key is the one that leaks.

And for the agent itself, the useful habit is different: ask it which model answers in this chat, check /status, and let the agent show you a draft before anything goes out. How that confirmation works is described in Action confirmations: what an AI agent does on its own, what waits for your yes, and what counts as a yes. If you ever want everything gone, How to delete your data from an AI agent: memory, files, chat history and the account walks through it.

How much it costs

Free is $0 with 200 M your first month, then 100 M every month, no card. Pro is $13.90 a month with 400 M, and $1.39 for the first month if you subscribe within your first 7 days. On the default model, 20,000 tokens of text cost 1 M; a web search costs 1.5 M, a minute of voice transcription 1 M.

With your own Claude or Codex connected, the heavy work runs on your own OAuth and does not touch your magnets: the provider counts it against your subscription. Search, voice and images keep their usual rates. All rates are on the pricing page.

An API key at OpenAI or Anthropic is billed by them, per request, on top of any subscription you have. If you only need a model inside your agent, the subscription route spares you that second bill. For a side-by-side look at the two providers themselves, see ChatGPT vs Claude in 2026: which one to pick for your work, by plans, context windows and strengths.

Messages worth copying

/status

/claude

Which model is answering in this chat right now, and where do my messages go?

Before you send anything to a client, show me the draft and wait for my yes.

/deepseek

Start your agent on the default model, no keys, and send /claude the day you want the subscription you already pay for behind the same chat.

Try it with your own agent

Free, no card. The agent starts working in the chat straight away.

Create your AI agent

Questions

Is an OpenAI API key free?

Creating the key costs nothing, but you pay for the requests you make with it. OpenAI bills API usage separately from ChatGPT, through the billing settings of your API account, and Anthropic sells prepaid credits in the Claude Console. Check the current prices on each provider's pricing page before you start.

Does my ChatGPT Plus or Claude Pro subscription include API access?

Both providers treat them as separate products. OpenAI keeps ChatGPT billing and API billing apart. Anthropic says the same about Claude plans and the Console, and adds that Max, Ultra and Team plans come with monthly API credits once you link a Console organization.

Do I need an API key to use WAM Agents?

No. The default model, DeepSeek, works on every plan with no keys of your own, paid with the magnets of your plan. On Pro you can attach your own Claude with /claude or Codex on your ChatGPT subscription with /codex, and both connect by signing in to your account, with no key to copy.

Where do my messages go when I connect my own Claude?

Requests go to Anthropic under your own account. For this flow you are the independent controller: WAM Agents does not transfer your personal data to Anthropic. Your chat history stays in your isolated container.

Is it safe to paste an API key into a chatbot?

Treat a key like a password. OpenAI's own guide says to keep keys out of browser code, source control, logs and customer-facing responses. With WAM Agents the question does not come up for your model: the default model needs no key, and your own Claude or Codex connects by signing in.

What still uses outside services if I switch to my own model?

Some tools run on outside services whatever the model: web search via Perplexity, voice transcription via Deepgram, image generation via Replicate, richer voices via MiniMax, Gmail and Calendar connections via Composio. The full list with countries is on the Subprocessors page.

Your AI agent in Telegram, ready in a minute

Open the bot, hit Start, and it walks you through the rest.

Create your AI agent

Free · no card · nothing to install · cancel in the bot

Free no card, nothing to set upCreate your AI agent