I use my own API key in private projects, and it seems to work like this:

# .env file
ANTHROPIC_API_KEY=sk-...

In the project:

# .claude/settings.json
{
  "apiKeyHelper": "source .env && echo $ANTHROPIC_API_KEY"
}

Then invoke claude in inside the project root and verify with /status command:

Claude Code v1.0.85
  L Session ID: 69...
...
 Account
  L Auth Token: apiKeyHelper
  L API Key: apiKeyHelper

Source: https://github.com/anthropics/claude-code/issues/441#issuecomment-3207226042

If someone get this error: Error getting API key from apiKeyHelper (in settings or ~/.claude.json): /bin/sh: 1: source: not found

That error comes from the fact that your shell (likely /bin/sh) doesn’t recognize the source command — it’s a Bash built-in, not POSIX-standard.

Here's the fix (Force bash):

{ "apiKeyHelper": "bash -c 'source .env && echo $ANTHROPIC_API_KEY'" }

Never teach people to put a secret key in a non-popular env var convention file. Always put it in the popular environment variable file.

Answer from ImBIOS on Stack Overflow
🌐
Claude
docs.claude.com › en › api › admin-api › apikeys › get-api-key
Get API Key - Claude Docs
{ "created_at": "2024-10-30T23:58:27.427722Z", "created_by": { "id": "user_01WCz1FkmYMm4gnmykNKUu3Q", "type": "user" }, "id": "apikey_01Rj2N8SVvo6BePZj99NhmiT", "name": "Developer Key", "partial_key_hint": "sk-ant-api03-R2D...igAA", "status": "active", "type": "api_key", "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ" } ... curl "https://api.anthropic.com/v1/organizations/api_keys/apikey_01Rj2N8SVvo6BePZj99NhmiT" \ --header "anthropic-version: 2023-06-01" \ --header "content-type: application/json" \ --header "x-api-key: $ANTHROPIC_ADMIN_KEY"
🌐
Social Intents
help.socialintents.com › social intents knowledge base › ai chatbots › how to find your anthropic claude api key
How to Find Your Anthropic Claude API Key - Social Intents Knowledge Base
In this article, we're going to show you how to easily generate an Anthropic Claude API Key to quickly integrate the Claude AI models into your projects and applications.
🌐
Merge.dev
merge.dev › blog › anthropic-api-key
How to get your Anthropic API key (3 steps)
March 13, 2024 - If you recently created a new account, you may have credits to test the API without setting up a paid plan. To claim the credits, you’ll need to provide your phone number. If you go this route, you can skip the remainder of this guide. If you don’t have credits, you’ll need to upgrade to a paid plan. You can see information about plans if you hit Select Plan. ... If you select the Scale plan, you’ll be prompted to talk to Anthropic’s sales team and the rest of this guide won’t apply.
🌐
Nightfall AI
nightfall.ai › ai-security-101 › anthropic-claude-api-key
Anthropic Claude API Key: The Essential Guide | Nightfall AI Security 101
For example, you are not allowed to use your API key to generate content that is harmful, unsafe, biased, or unfair. To obtain an Anthropic Claude API key, you must first create an Anthropic account. Once you have created an account, you can go to your account dashboard and click on the "API ...
🌐
Pickaxe
pickaxe.co › post › how-to-get-your-claude-api-key-a-step-by-step-guide
How to get your Claude API key: A step-by-step guide (2025) - Pickaxe Blog
To get a Claude API key, you must create an Anthropic account add securely generate your key within the Anthropic Console. The key is shown only once so store it safely.
🌐
Zapier
zapier.com › productivity › app tips
Claude API: How to get a key and use the API
July 8, 2024 - This guide includes a step-by-step tutorial on how to get a Claude API key, how to call the Claude API, and how to get the responses where you want them.
🌐
Apideck
apideck.com › blog › how-to-get-your-claude-anthropic-api-key
How to Get Your Claude (Anthropic) API Key
Once approved, log in to the Anthropic Console. This dashboard is where you'll manage: ... In your console dashboard, locate the "API Keys" section in the navigation menu.
Find elsewhere
🌐
Claude API Reference
platform.claude.com › docs › en › api › admin › api_keys › retrieve
Get Api Key - Claude API Reference
ID of the Workspace associated with the API key, or null if the API key belongs to the default Workspace. ... curl https://api.anthropic.com/v1/organizations/api_keys/$API_KEY_ID \ -H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
🌐
Alexcodes
alexcodes.app › docs › keys › adding-claude-anthropic-api-key
Adding your API Key for Claude (Anthropic) - Alex Sidebar
Keep your API key secure and never share it publicly. If you suspect your key has been compromised, you should immediately rotate it in the Anthropic Console. Anthropic bills based on the number of tokens used · You can monitor your usage in the Anthropic Console ... New accounts typically come with some free credits to get started For more information about Claude...
🌐
Mac Install Guide
mac.install.guide › ai › claude › account
Anthropic Account and Claude API Key · Mac Install Guide
From "Settings", click "API keys, or from the Dashboard main page, click "Get API keys". You'll see a button for "Create Key". Choose a workspace ("default" is fine) and give the key any name you like ("first-claude-key" is good).
🌐
Reddit
reddit.com › r/claudeai › do i need to pay for both claude and anthropic to use the api key?
r/ClaudeAI on Reddit: Do I need to pay for both Claude and Anthropic to use the API key?
October 30, 2024 -

I just paid for the Pro version of Claude. Downloaded Cursor and when I went to add the 'API key', it seems like I also need to pay for Anthropic?

I am a little confused. First time doing the Cursor IDE setup. I am a Rider dev.

I want to be able to use Cursor without any limitations. Not bragging but money is not a concern. I make enough as a Software Consultant to afford those memberships.

Also, I heard about bolt.new or something along those lines? I checked it out but it seems towards opinionated out-of-the-box frontend applications.

Any advice?

Thanks!!!

🌐
Pickaxe
community.pickaxe.co › general › questions
How do I get a Claude API key? - Questions - Pickaxe Community Forum
January 21, 2025 - Okay, so I’m a newbie so go easy on me. This might be dumb but I can’t for the life of me figure out how to get or find a Claude API key. I am wondering if someone can explain how I can get a claude API key from Anthropi…
🌐
Reddit
reddit.com › r/claudeai › how to get anthropic api key when "subscribing" to pro via ios?
r/ClaudeAI on Reddit: How to get Anthropic API Key when "subscribing" to Pro via iOS?
May 20, 2025 -

All.

Pretty much in the subject. I'm subscribed to Pro through iOS.

Firstly - I can't actually see that I'm subscribed to Pro when I log in to Anthropic Console. (It seems to think I have a Free account, despite same email as Apple Subscription).
Secondly - I can't therefore get an API key (which I need for some Langchain work).

I'm losing my sanity here...

Help! Please.

UPDATED: Thanks all for the sage comments re subscriptions through iOS. BUT - this doesn’t explain why the ‘Pro’ subscription isn’t then being recognised by Claude?? (It thinks I’m on Free even though I pay monthly (through Apple - though, no longer).

🌐
Apidog
apidog.com › blog › how-to-use-claude-api-key-for-free-in-2025
How to Use Claude API Key for Free in 2025
October 19, 2025 - Start by visiting the official Claude API website. Navigate to the registration page and create a developer account. Complete the registration process by providing your email, selecting a password, and verifying your email address.
🌐
Anthropic
docs.anthropic.com › en › docs › get-started
Get started with Claude - Claude Docs
Make your first API call to Claude and build a simple web search assistant
🌐
LobeHub
lobehub.com › docs › usage › providers › anthropic
Using Anthropic Claude API Key in Lo... · LobeHub
5 hours ago - Set up your billing for the API key to work on https://console.anthropic.com/settings/plans (choose the "Build" plan so you can add credits and only pay for usage). Access the Settings interface in LobeChat.