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
claude.ai
Claude
Talk with Claude, an AI assistant from Anthropic
Discussions

How do I use Claude Code with an existing Anthropic API Key? - Stack Overflow
Instead of going through claude console /login to create a new API key, I would like to use an existing Anthropic API key. How do I get Claude Code to do this? The /login command forces you to authenticate via Anthropic. Claude Code would like to connect to your Anthropic organization MyCompany ... Account ... More on stackoverflow.com
🌐 stackoverflow.com
Claude Code: Console API Account VS Claude Pro Account
Linked my Gmail account both for Console account and a Claude Pro one. For the Pro account, do I have some tokens available for Claude Code usage ?… More on reddit.com
🌐 r/ClaudeAI
1
1
May 6, 2025
Differences between Claude and Anthropic accounts?
API is a different product. Yes, sign up for it separately. Yes, pay for it separately. It's based on usage. I spend a few hundred a month on it with moderately heavy coding usage. Other people say they spend $5 a month on it doing some light writing. FYI there are tiers based on how long you've had an API account and how much money you've deposited. You will have fairly tight limits on the early Tiers. https://docs.anthropic.com/en/api/rate-limits More on reddit.com
🌐 r/ClaudeAI
2
1
February 3, 2025
Claude using my personal account rather than my organization account (same email)
Duplicate / re-opening of #199 The suggested solution is to select "Switch account" and/or "Switch organization". My account only has the "Switch Account" button. I ta... More on github.com
🌐 github.com
20
March 6, 2025
🌐
Apideck
apideck.com › blog › how-to-get-your-claude-anthropic-api-key
How to Get Your Claude (Anthropic) API Key
This step-by-step guide shows you ... up billing, and test your first request. ... Navigate to console.anthropic.com and click the "Sign up" or “Continue with Google” button. You'll need to register using your email ...
🌐
Claude
support.claude.com › en › collections › 5370014-claude-api-and-console
Claude API and Console | Claude Help Center
How can I delete my Claude Console account? API Prompt Design · Introduction to Prompt Design · What is the maximum prompt length? Claude’s response to my prompt is too brief.
🌐
ZDNET
zdnet.com › home › innovation › artificial intelligence
How to install and configure Claude Code, step by step | ZDNET
1 week ago - Now, it will ask where to install Claude Code. This is a selection box for all your GitHub accounts. You just need to choose your account. As I said, the real Claude Code install will come later.
🌐
Anthropic
anthropic.com › news › claude-code-on-the-web
Claude Code on the web
November 12, 2025 - Update: Claude Code on the web is now available in research preview for Team and Enterprise users with premium seats, in addition to Pro and Max users. Claude Code on the web is on by default for these users, and account admins can toggle access in the Claude settings.
Find elsewhere
🌐
Anthropic
anthropic.com › news › workspaces
Workspaces in the Anthropic API Console
September 10, 2024 - Streamline access control: Improve account security by assigning user permissions at the workspace level. Monitor usage efficiently: Gain insights into API usage and costs broken down by workspace, making it easier to track and optimize your resource allocation. Workspaces are now available to all Anthropic API users in our Console...
🌐
Reddit
reddit.com › r/claudeai › claude code: console api account vs claude pro account
r/ClaudeAI on Reddit: Claude Code: Console API Account VS Claude Pro Account
May 6, 2025 - When I use Claude Code, I only see tokens used from the API account, tried relogging (prompted for choosing between those 2 options) and selecting the Pro account (see below image) but nothing seems to change.
🌐
Alexcodes
alexcodes.app › docs › keys › adding-claude-anthropic-api-key
Adding your API Key for Claude (Anthropic) - Alex Sidebar
To use Claude’s models (such as Claude 3.5 Sonnet and Claude 3.7 Sonnet) in Xcode with Alex Sidebar without paying a subscription for Alex, you’ll need an Anthropic API key. Here’s how to get one: ... 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’s pricing and usage, visit Anthropic’s pricing page.
🌐
Claude
support.claude.com › en › articles › 8987223-can-i-have-a-claude-account-and-a-console-account
Can I have a Claude account and a Console account? | Claude Help Center
Yes. You can have a Claude account (free, Pro, Max, Team, or Enterprise) and a Console account (to access the Claude API) with the same email address.
🌐
Reddit
reddit.com › r/claudeai › differences between claude and anthropic accounts?
r/ClaudeAI on Reddit: Differences between Claude and Anthropic accounts?
February 3, 2025 -

Sorry for the (surely) stupid question, I've à Claude account with a Pro subscription, I need to work with the API, but when I've tried to login in the Anthropic's console using the same Claude's account email, it asks me to create an account, and was a bit surprised and worried to mess things up. Can I go with the same email? And BTW do I really need to pay for two different accounts? That's not fair to my understanding. Thank you!!

🌐
Claude
support.claude.com › en › articles › 8114531-i-created-a-claude-console-organization-how-do-i-start-using-the-claude-api
I created a Claude Console organization - how do I start using the Claude API? | Claude Help Center
Updated this week · To use the Claude API and Workbench, add usage credits to your organization's balance. You’ll need to fill out some additional information about your organization and use case.
🌐
GitHub
github.com › anthropics › claude-code › issues › 377
Claude using my personal account rather than my organization account (same email) · Issue #377 · anthropics/claude-code
March 6, 2025 - Duplicate / re-opening of #199 The suggested solution is to select "Switch account" and/or "Switch organization". My account only has the "Switch Account" button. I ta...
Published   Mar 06, 2025