September 23, 20269 min readMultimodel Chat TeamUpdated September 23, 2026

How to Add an API Key to a Chat App (3 Steps, 2026)

Short answer: three steps, about two minutes per provider. Create a key in the provider's developer console (not in the consumer app), paste it into the chat app's provider settings, and send a test message to confirm billing works. OpenAI keys start with sk-proj-, Anthropic with sk-ant-api03-, Google with AIzaSy, xAI with xai-, OpenRouter with sk-or-v1-. If setup stalls, it is almost always billing, a truncated copy, or a subscription that was never an API key.

Connecting a key is the whole premise of BYOK chat: you pay providers for tokens directly and use whatever app you like on top. The step where people get stuck is small and boring. The key lives in one website, the paste box lives in another, and the error messages in between say things like "insufficient quota" when the real problem is that no payment method exists. This guide covers the generic flow for every major provider, with links to the click-by-click guides where you need them.

Before you start: an API key is not a subscription

This is the number one confusion, so it comes first. Your ChatGPT Plus login is not an OpenAI API key. Claude Pro and Claude Max do not include API credits. Consumer subscriptions pay for access to a chat app; API keys pay per token at a different price sheet, from a different console.

ProviderConsumer subscription (not a key)What you needConsole
OpenAIChatGPT Plus / ProPlatform account + API billingplatform.openai.com
AnthropicClaude Pro / MaxClaude Platform account + creditsplatform.claude.com
GoogleGoogle One / AI ProJust a Google account (free tier)aistudio.google.com
xAIX PremiumxAI Console accountx.ai → API tab
OpenRouterNoneAccount + prepaid creditsopenrouter.ai

You can usually sign in to the developer console with the same email as your consumer subscription. The accounts are linked; the billing is not.

Step 1: create the key in the provider console

Every provider shows the key exactly once, at creation. Copy it before closing the dialog; if you lose it, you delete the key and make a new one.

ProviderKey formatBilling to expect
OpenAIsk-proj-…Card or credits required before first request
Anthropicsk-ant-api03-… (~108 chars)Prepaid credits, including claimed free credits
GoogleAIzaSy… (prefix + 33 chars)Free tier, no card (Gemini 3.7 Flash: 10 RPM, 250 RPD); billing for Pro models
xAIxai-…$25 promotional credits for new accounts, expiring after 30 days
OpenRoutersk-or-v1-…Prepaid credits for paid models; :free models work without

The console moves: OpenAI's keys live at platform.openai.com/api-keys ("Create new secret key"). Anthropic moved everything to Claude Platform (platform.claude.com; the old console.anthropic.com redirects), where keys live under Settings → API Keys. Google creates keys in AI Studio and lets you restrict them in the Cloud Console. xAI's flow starts at the API tab on x.ai and runs through "Manage API keys". OpenRouter's "Get API Key" button lands on the keys page, where each key can carry its own credit limit.

The click-by-click versions, with screenshots of every field: OpenAI, Anthropic, Google, xAI, OpenRouter, and custom OpenAI-compatible endpoints for everything else.

Two habits worth forming while the dialog is open. Name the key after the app that will hold it ("Multimodel Chat", "CI tests") so the provider's usage page stays readable later. And save the key in a password manager, not in a plain file, a chat message, or a screenshot.

Step 2: connect it to the chat app

In a BYOK app the paste box lives in the provider settings. In Multimodel Chat: Settings → AI Providers, pick the provider, paste, save. For OpenRouter and custom endpoints the app fetches the live model list as you paste, so a bad key fails before you can save. On OpenAI, Anthropic, Google, and xAI, your first test message is the real check.

The paste itself causes more failures than any API. The provider shows the key once, copying often picks up a trailing newline or drops the tail, and most keys are case-sensitive. If the app rejects the key, re-copy from the password manager entry you just saved rather than from the dead dialog.

While you are in the settings, decide where the key should live. Multimodel Chat offers two storage modes, hosted (AES-256 encrypted on the server, decrypted only for a request) or local (encrypted in your browser, used in memory). The trade-offs, including what each mode protects on shared machines, are in local vs hosted API key storage. Using OpenRouter as your one key instead? The provider-specific flow is in how to use your OpenRouter key in a chat app, and the custom-endpoint case is covered by what an OpenAI-compatible API is.

Step 3: verify it actually works

Confirm three things and setup is finished. Send a short test message to each connected provider and read the reply. Open the provider's usage page and check that a request just landed (it may take a few minutes to show). Then set a spend limit or alert now, while you are in the billing screens: OpenAI has monthly hard limits, Anthropic has spend caps, OpenRouter caps per key. The full walkthrough for all five providers is in how to monitor and cap your AI API spending.

Why bother with the usage-page check when the test message already replied? It confirms the key is billing from the account you expect. People with two workspaces, an old trial account, or a shared org find out at the end of the month otherwise.

When it does not work: the five usual errors

Error messageWhat it actually meansFix
"No API key provided" / 401Copy is truncated or has stray whitespaceRe-copy the key, paste without spaces
"Insufficient quota" / "Credit balance too low"No billing attached, or credits ran outAdd a payment method or buy credits in the console
"Model not available"Free tier or wrong workspace covers only some modelsEnable billing (Google Pro models), or pick the right workspace
429 Too Many RequestsFree-tier or new-account rate limitsWait for the reset, raise limits with billing, or slow down
401 after working fineKey was revoked, rotated, or expiredCreate a fresh key and reconnect

xAI adds one more: promotional credits expire 30 days after signup, and the failure looks exactly like a dead key until you read the billing page.

Keep the key healthy

Once it works, the maintenance is light. One key per app keeps a leak or a rotation contained to one place, and the post-setup API key leak check tells you whether anything already escaped. When a key needs to die, whether from a leak or a scheduled rotation, the console steps are in how to revoke an API key.

Which setup path is yours?

If you…Do this
Have one provider and want it working nowStep 1–3 above with your provider's guide
Have ChatGPT Plus and want "the API"Create a Platform key first. Plus does not include API credits
Want one key for many modelsUse an OpenRouter key instead of four
Run models on your own hardwareConnect a custom endpoint (Ollama, LM Studio)
Care most about key custodyRead the storage comparison before Step 2

FAQ

Is my ChatGPT Plus account an API key? No. ChatGPT Plus is a subscription for the ChatGPT app. API access comes from a key created in the OpenAI Platform, with its own pay-per-token billing. The same split applies to Claude Pro and the Anthropic API.

How long does it take to add a key to a chat app? About two minutes per provider once the account exists. Budget an extra ten minutes the first time for billing setup and email verification.

Can I use one key for every model? One OpenRouter key covers 500+ models from OpenAI, Anthropic, Google, Meta, and others, billed from one credit balance (with a fee for the convenience). Direct provider keys are cheaper per token at volume. The fee math, including when direct keys win, is in the BYOK cost comparison.

Where should I keep the key between the console and the app? In a password manager. The provider shows it once, so the manager entry is your only copy, and it keeps the key out of screenshots, chat logs, and committed files.

Do I need to give the chat app my credit card too? No. A BYOK app never bills you for tokens. You bring the key and the provider charges you directly; the app charges separately for the workspace, if at all. That split is the point.

Start your free trial → — 7 days, all providers, no credit card required.

The workspace is $2/month or $39 once — AI providers always bill your key directly at their own rates.

See pricing
Share this story
Stay in the loop

The Multimodel Journal

Get the latest AI insights, model comparisons, and product updates delivered to your inbox.

Subscribe