How to Get a Claude or OpenAI API Key in 2026 (and Where to Get Credits Cheaper)
Step-by-step guide to creating a Claude API key on platform.claude.com and an OpenAI API key on platform.openai.com — plus the real signup friction points and a fingerprint-verified alternative for buying credits at a lower price.
Published 2026-06-23
Claude: sign in at platform.claude.com → Settings → Billing to add a payment method or prepaid credits → Settings → API Keys → Create Key → copy it immediately, it's shown once. OpenAI: sign in at platform.openai.com → Settings → Billing to add credits → Dashboard → API keys → Create new secret key. Both providers require a verified phone number and a card that successfully authorizes a charge before any key will actually work — international cards get declined often, and there's no meaningful free tier for either API anymore. If that friction isn't worth it, or you don't want to prepay full list price, APIMaster's marketplace sells fingerprint-verified access to the same models at up to 90% off OpenAI and 85% off Claude pricing, top up from $1, no subscription.
Use the official Claude/OpenAI platforms when you need a direct vendor relationship, enterprise controls, or strict compliance. Use a fingerprint-verified API marketplace when your blocker is card rejection, regional billing friction, prepaid minimums, or price — but verify the model before spending credits.
Why Official Signup Has More Friction Than You'd Expect
Both URLs changed in 2026, which is the first thing that trips people up: Anthropic retired console.anthropic.com in favor of platform.claude.com (old links and bookmarks still redirect, but tutorials written before the switch reference the dead name). OpenAI moved its docs to developers.openai.com, though the actual key dashboard is still at platform.openai.com/api-keys. If a guide you're reading mentions a URL that 404s, that's why.
Past the rename, the friction is structural, not cosmetic:
- Phone verification is mandatory. Both Anthropic and OpenAI require a verified phone number tied to one account before you can create an organization or generate a key. Virtual/VoIP numbers are frequently rejected.
- It's prepaid, not invoiced. Individual developer accounts don't get a postpaid bill — you add a card or buy credits up front, and the key simply won't authenticate requests until there's a positive balance.
- Card declines are common for non-US cards. International billing addresses and certain card networks get declined at checkout, with no clear error explaining why — it just fails silently or with a generic "payment method declined."
- New accounts start in the lowest usage tier. Anthropic's rate limits and spend limits start low and increase automatically as you spend more — so a brand-new key can hit 429s well before you'd expect, even with money in the account. OpenAI has an equivalent tiering system, and access to some newer or higher-capability models requires organization/ID verification first.
- There's no real free tier anymore. Both platforms occasionally hand out small trial credits, but they expire fast and aren't enough to build or test against in any sustained way.
None of this is a reason to avoid the official APIs — for production use, a direct relationship with Anthropic or OpenAI is still the default. But if you've hit a card decline, a verification wall, or you're just testing an idea and don't want to commit to official pricing yet, skip to the marketplace section below.
Get a Claude API Key (Official)
- Go to platform.claude.com and sign in or create an account. You'll be asked to verify your email and phone number.
- Open Settings → Billing and add a payment method, or buy prepaid credits. The key you generate next won't authenticate any request until this step is done.
- Open Settings → API Keys (platform.claude.com/settings/keys) and click Create Key.
- Copy the key immediately — Claude only shows it once.
Test it:
curl https://api.anthropic.com/v1/messages \
-H "content-type: application/json" \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 32,
"messages": [{"role": "user", "content": "Reply with exactly: ok"}]
}'
A successful response includes a content array with your model's reply.
Get an OpenAI API Key (Official)
- Go to platform.openai.com and sign in or create an account, verifying your email and phone number.
- Open Settings → Billing and add a payment method or buy credits.
- Go to the API keys dashboard (platform.openai.com/api-keys) and click Create new secret key.
- Copy the key immediately — it's only shown once.
Test it:
curl https://api.openai.com/v1/chat/completions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"messages": [{"role": "user", "content": "Reply with exactly: ok"}]
}'
A successful response includes choices[0].message.content.
Official API Key vs Marketplace Credits
| Path | Best for | Main friction | Model authenticity risk |
|---|---|---|---|
| Official Claude/OpenAI account | Production apps, compliance, direct vendor support | Phone verification, card approval, prepaid credits, low starter limits | Lowest, because requests go directly to the official provider |
| Fingerprint-verified API marketplace | Testing, cheaper credits, regional payment workarounds, multi-model access | You need to choose a verified channel instead of blindly trusting the model name | Manageable only if the channel publishes fingerprint detection results |
What Is the Cheapest Way to Buy Claude or OpenAI API Access?
If the official signup friction above is the reason you're reading this, the underlying problem isn't actually "how do I click the right buttons" — it's that official rates and prepaid minimums are inflexible. This is exactly the gap that aggregator marketplaces fill: instead of one fixed upstream account, you're buying access to a pool of channels, and the price reflects whichever route is currently cheapest — not a fixed list price.
Data point: In APIMaster's real-world checks, 43.8% of third-party API channels showed model mismatch, so cheap Claude/OpenAI access should be judged by fingerprint verification, not by the advertised model name.
The catch is that this market also has a real fake-model problem. Across APIMaster's own detection data — aggregate results from everyone who's actually run a check, not a cherry-picked sample — 43.8% of real-world checks on third-party API channels came back flagged for a model that didn't match what was advertised. A 2026 academic audit from CISPA Helmholtz Center, "Real Money, Fake Models: Deceptive Model Claims in Shadow APIs", found 45.83% of audited shadow APIs failed identity verification — the same order of magnitude, from an independent source. In plain terms: a meaningful share of cheap relays advertise Claude or GPT and quietly route your requests to something else.
This is the problem APIMaster.ai is built around. It's an aggregated AI API gateway with fingerprint-based model detection layered on top, so the channels in the marketplace aren't just cheap — they're checked.
- OpenAI APIs: up to 90% off · Claude APIs: up to 85% off vs. official list pricing, on the live marketplace
- Top up from $1 — pay as you go, no subscription, no prepaid minimum
- Fingerprint detection on every channel, with results published publicly on the leaderboard
- OpenAI-compatible endpoint, works with the OpenAI SDK, Claude Code, Cursor, LangChain, and anything that takes a
base_urloverride
Getting a key takes the same shape as the official flow, minus the billing friction:
- Sign in at https://apimaster.ai/console/dashboard (register at /register if you're new).
- Open API Keys, click Create token, and copy it immediately.
- Browse the marketplace to see live per-model pricing and each channel's detection status before you commit credits to it.
from openai import OpenAI
client = OpenAI(
api_key="sk-your-api-key",
base_url="https://apimaster.ai/v1",
)
response = client.chat.completions.create(
model="claude-sonnet-4-6",
messages=[{"role": "user", "content": "Reply with exactly: ok"}],
)
print(response.choices[0].message.content)
Full setup details are in the Get API Key and First Request docs.
Make Sure Your Key Is Actually Talking to the Real Model
Whether you go official or through a marketplace, the model name in your request body is not proof of what actually answered it — providers can inject a system prompt that makes any model claim to be Claude or GPT. The only reliable check is behavioral fingerprinting, not asking the model who it is. We cover why self-tests fail and how to run a real check in Is My Claude/OpenAI API Key Real, or Was the Model Swapped? — or just run your key through the free model tester directly.
FAQ
Is there a free Claude or OpenAI API key? Not in any sustained way. Both providers occasionally issue small trial credits to new accounts, but they're short-lived and too small to build or test against long-term. There's no permanent free tier for either API.
Can I use my ChatGPT Plus or Claude Pro subscription as an API key? No. Consumer subscriptions (ChatGPT Plus, Claude Pro/Max) are completely separate from API access — they don't generate an API key, and API usage is billed separately by tokens, not by the subscription.
Why did my card get declined when adding billing? Both Anthropic and OpenAI's payment processors reject a meaningful share of international cards and some card networks, often without a clear reason. Trying a different card, or a marketplace that accepts more payment methods and doesn't require a prepaid minimum, are the two practical workarounds.
How much does 1M tokens actually cost? It depends on the model and whether you're paying input or output rates, and official prices change over time — check the Claude or OpenAI pricing pages for current official numbers, or the APIMaster marketplace for live per-model pricing across channels, which is typically lower than list price.
Is it safe to buy API access from a marketplace instead of going direct? It depends entirely on whether the channel is verified. The risk isn't the marketplace model itself — it's that some cheap relays silently swap the model you're paying for. Check a channel's fingerprint detection status before committing credits to it, the same way you'd check reviews before buying from a new seller.