How to Get an Anthropic API Key in 2026 (and Free Claude API Credits)
Guide

How to Get an Anthropic API Key in 2026 (and Free Claude API Credits)

Step-by-step guide to creating an Anthropic API key in the Claude Console, what the free credits cover, rate limit tiers, keeping keys safe, and how startups get Claude API credits free.

An Anthropic API key is the credential that lets your code call Claude. Getting one takes about five minutes in the Claude Console, and new accounts come with a small free credit to test with. This guide walks through creating the key, what it costs to use, the rate limit tiers you start in, how to keep the key safe, and the route that gets a startup its Claude API usage free.

What an Anthropic API Key Is (and Isn't)

The Claude API and the Claude chat app are separate products with separate billing. A Claude Pro or Max subscription is for a person using claude.ai or Claude Code interactively. An API key is for software: your backend, a script, an agent, a CI job. The key identifies your Claude Console organization and every request made with it is metered per token and billed to that organization.

Two things people expect an API key to do that it does not. It does not give you a Pro subscription, and a Pro subscription does not give you API credit. And it is not "Claude for free" beyond the small starting allocation. The API is pay-as-you-go. The genuinely free route for companies is the Claude for Startups program, which we cover below.

You also do not strictly need an Anthropic key to use Claude models. Claude is available on Amazon Bedrock, Google Cloud Vertex AI and Microsoft Foundry, where you authenticate with that cloud's credentials and the usage lands on your cloud bill. That matters if you already have AWS Activate or Google Cloud startup credits.

How to Get an Anthropic API Key: Step by Step

Step 1: Create a Claude Console account. Go to platform.claude.com and sign up. Use your company email, not a personal Gmail. The organization you create here is what the startup program credits attach to later, and moving credits between organizations is not something you want to negotiate.

Step 2: Set up billing, or use the starting credit. Anthropic's docs say new users receive a small amount of free credits to test the API. That is enough to make calls and confirm your integration works. To go beyond it, add a credit card under Billing. Billing is monthly in arrears on actual usage, in USD.

Step 3: Create a workspace (optional but recommended). Workspaces let you separate keys, spend limits and rate limits by environment or product. Create one for development and one for production before you create keys, so each key is scoped from the start. When you first sign Claude Code in with a Console account, Anthropic auto-creates a workspace called "Claude Code" for that usage; you cannot create keys for it.

Step 4: Generate the key. Open API Keys in the Console, choose the workspace, click Create Key and give it a name that says where it will live ("prod-backend", "ci-eval"). The full key is shown once. Copy it into your secrets manager immediately; you cannot retrieve it again, only revoke it and make a new one.

Step 5: Put the key in an environment variable. Anthropic's SDKs read ANTHROPIC_API_KEY by default. Export it in your shell or set it in your deployment platform's secrets. Never paste it into source code, a notebook that gets committed, or a client-side bundle.

Step 6: Make a test request. Install the Python or TypeScript SDK, send a short message to a cheap model such as Claude Haiku 4.5, and confirm you get a response and that usage appears on the Console's Usage page. If you see an authentication error, the key was copied incompletely or belongs to a different workspace than you expect.

Step 7: Set a spend limit. Under the workspace's limits, cap monthly spend. A runaway loop against Opus 5 can spend real money overnight. Set the cap before you deploy, not after the first surprising invoice.

What Using the Key Costs

The key itself is free. Usage is billed per million tokens, with input and output priced separately. As of September 2026, Claude Haiku 4.5 is $1 input and $5 output per million tokens, Claude Sonnet 5 is $2 and $10, Claude Opus 5 is $5 and $25, and Claude Fable 5.1 is $10 and $50. Prompt cache reads cost 10 percent of the input price and the Batch API is 50 percent off for asynchronous work.

For a sense of scale, a million tokens is roughly 750,000 English words. Anthropic's own example puts 10,000 support tickets at about $37 on Haiku 4.5. A one-hour coding agent session on Opus 5 with 50,000 input and 15,000 output tokens is about 63 cents. We keep a full rate table with worked examples on our Claude API pricing page, and the subscription plans are compared on Claude pricing.

One tokenizer note: Claude 4.7 and later models produce roughly 30 percent more tokens for the same text than earlier models did. Compare models on your real prompts rather than on list price alone.

Rate Limits and Usage Tiers

Every key is subject to rate limits that depend on your organization's usage tier, not on the key itself. Anthropic describes three standard tiers. Start is the entry level with limits suitable for getting going. Build raises them for growing applications. Scale offers the highest standard limits for production workloads. You move up as your spend and account history grow, and limits beyond Scale are arranged with the sales team.

Limits are expressed as requests per minute and tokens per minute. If you see 429 errors during a launch, that is the tier, not a bug. Two ways to get ahead of it: set workspace rate limits so one product cannot starve another, and apply to Claude for Startups, which grants members Anthropic's highest rate limits from day one. For many startups the priority limits are worth more than the credits during a launch week.

Keeping Your Anthropic API Key Safe

One key per environment and per service. If a key leaks, you want to revoke exactly one thing. Use workspaces to keep production, staging and CI keys separate, each with its own spend limit.

Never ship a key to the client. Browser bundles, mobile apps and public notebooks are all readable by users. Calls to the Claude API should go through your backend. If you need per-user usage tracking, do it in your own code, not by handing out keys.

Keep keys out of git. Add your .env file to .gitignore, use your platform's secret store for deployments, and turn on secret scanning in your repository host. If a key does get committed, revoke it in the Console the same hour; assume it was harvested the moment it hit a public repo.

Set spend limits and watch the Usage page. Workspace limits cap the damage from a bug or a leak. The Console's Usage page shows tokens and cost by model and by workspace; check it during the first week of any new deployment.

Rotate on a schedule and on departures. Rotate production keys periodically and immediately when someone with access leaves. Admin API keys, which manage the organization itself, should live with as few people as possible.

Can You Get a Free Anthropic API Key?

The key is always free; the question is whether the usage is. Beyond the small starting credit for new accounts, there are three legitimate routes to free Claude API usage.

Claude for Startups. Anthropic's self-serve program gives early-stage companies free Claude API credits, its highest rate limits, early access to launches, and access to Claude Code, the Claude API, Claude Managed Agents and Claude Cowork. To qualify, your company must have been founded within the last four years and must not have received Anthropic startup credits before. Institutional funding or backing from an Anthropic partner VC or accelerator unlocks the larger allocations. The form at claude.com/programs/startups asks for a Claude Console account, a company email, your website and a sentence on what you are building, and Anthropic says it takes about two minutes. The credits apply to the first-party API only, not Bedrock or Vertex, and standard pricing resumes automatically when they run out. Full eligibility details and common rejection reasons are on our Anthropic startup program page.

Cloud startup credits. Run Claude through Amazon Bedrock or Google Cloud Vertex AI and the usage bills to your cloud account, where AWS Activate or Google Cloud for Startups credits apply. You use the cloud's credentials rather than an Anthropic key. This is the overflow route once Anthropic's credits are gone.

Academic and research discounts. Anthropic's pricing docs note that academic and research discounts may be available, and scientists at academic and nonprofit institutions can start on the Team Plan for Scientists at no cost. These are arranged case by case rather than through a form.

What does not exist: a promo code, an unlimited free tier, or a reseller who can legitimately sell you a "free Anthropic API key." Shared or purchased keys violate Anthropic's terms and get revoked, usually with the organization behind them.

Frequently Asked Questions

How do I get an Anthropic API key?

Sign up for the Claude Console at platform.claude.com with a work email, open API Keys, pick a workspace, and click Create Key. Copy the key when it is shown; it is displayed once. Store it in an environment variable called ANTHROPIC_API_KEY.

Is the Anthropic API key free?

Creating a key is free and new accounts receive a small amount of free credit to test with. Usage beyond that is billed per million tokens. Startups founded within the last four years can apply for Claude for Startups credits that cover API usage.

Does Claude Pro include an API key?

No. Claude Pro, Max and Team are subscriptions for the chat app and Claude Code. API access is a separate Claude Console account with its own billing. You can have both, but neither pays for the other.

How much does the Claude API cost per request?

It depends on tokens and model. A short exchange of 500 input and 200 output tokens on Sonnet 5 costs about $0.003. A one-hour agent session on Opus 5 with 50,000 input and 15,000 output tokens is about $0.63. See our Claude API pricing page for the full table.

What are Anthropic API rate limits for new accounts?

New organizations start in the Start tier with entry-level requests-per-minute and tokens-per-minute limits, then move to Build and Scale as spend and account history grow. Claude for Startups members receive Anthropic's highest rate limits from the start.

Can I use my Anthropic API key with Claude Code?

Yes. Sign Claude Code in with your Console account and usage bills per token to the organization through an auto-created "Claude Code" workspace. Alternatively sign in with a Pro or Max subscription and usage draws from the plan allowance instead. Our Claude Code pricing guide compares the two.

Next Steps

Create the Console account on your company domain today, generate a scoped key with a spend limit, and confirm a test request lands on the Usage page. Then apply to Claude for Startups before you deploy anything real. Our Claude for Startups application guide walks through the form, and the Anthropic program page keeps the eligibility rules current.

Brady Heinrich Written by Brady Heinrich, Founder of Credit for Startups

Related Articles

From our sister site

Idea for Startups — startup ideas, validated with real data

A new researched idea every day: search trends, market gaps, competitors, and a launch plan. Pair it with the credits above.

ideaforstartups.com

Join 3,000+ startup founders

Get monthly updates on new credits, perks, and funding opportunities. Join founders who've already discovered over $10M in startup resources.

Monthly Refreshes
Get curated updates on new funding opportunities, exclusive deals, and early access to upcoming startup resources.
No spam
Just valuable funding opportunities and resources. One email per month, and you can unsubscribe anytime.