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
🌐
Anthropic
console.anthropic.com
Claude Console - Anthropic
Build with the Claude API
Claude Console
By continuing, you agree to Anthropic’s Commercial Terms and Usage Policy, and acknowledge our Privacy Policy.
Claude Developer Platform
Build with the Claude API
Anthropic Console
By continuing, you agree to Anthropic’s Commercial Terms and Usage Policy, and acknowledge our Privacy Policy.
🌐
Anthropic
docs.anthropic.com › en › docs › get-started
Get started with Claude - Claude Docs
OverviewPrompt generatorUse prompt templatesPrompt improverBe clear and directUse examples (multishot prompting)Let Claude think (CoT)Use XML tagsGive Claude a role (system prompts)Prefill Claude's responseChain complex promptsLong context tipsExtended thinking tips ... Reduce hallucinationsIncrease output consistencyMitigate jailbreaksStreaming refusalsReduce prompt leakKeep Claude in character ... Learn common patterns for the Messages API. ... Explore Claude's advanced features and capabilities. ... Discover Anthropic client libraries.
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 More on stackoverflow.com
🌐 stackoverflow.com
A "Just use API" Guide
Beware of users hocking their own UI products. They like to respond personally to say this thing they found is the best, not revealing it is theirs until you grill them. I use LibreChat. It's okay. Very jittery when generating answers, but it works. Also does caching. Installing on Docker on a mac was not fun, but just a one time hassle. I've used AnythingLLM. It's much easier to install. IDK anything else about it. Apparently bigAGI is good. That name makes me cringe so I've never tried. Oh also you can generate a new API key whenever you want. If you think someone might have maybe possibly stolen yours just make a new one. It is very very easy. EDIT: Do not worry about the best front end. They all work. Use whatever random one you first think is ok. Keep an eye out on your Anthropic console to make sure your API key hasn't been stolen. More on reddit.com
🌐 r/ClaudeAI
116
287
December 16, 2024
[Anthropic] You can now generate production-ready prompts in the Anthropic Console. Describe what you want to achieve, and Claude will use prompt engineering techniques like chain-of-thought reasoning to create more effective, precise and reliable prompts.
prompts engineers are already loosing their jobs, times are moving faster More on reddit.com
🌐 r/singularity
62
292
May 10, 2024
New features added to the Anthropic Console. Claude can generate prompts, create test variables, and show you the outputs of prompts side by side.
For non-console users with a subscription, can you access the prompt generation feature? More on reddit.com
🌐 r/ClaudeAI
3
18
May 2, 2024
🌐
Anthropic
support.anthropic.com › en › articles › 9534590-cost-and-usage-reporting-in-console
Cost and Usage Reporting in the Claude Console
The Claude Console provides detailed cost and usage reporting to help you effectively manage your API usage and associated costs. This guide walks you through these features and how to use them.
🌐
Claude
support.claude.com › en › articles › 8606378-how-do-i-use-the-workbench
How do I use the Workbench? | Anthropic Help Center
The Workbench allows you to create and test prompts within your Claude Console account. You can enter your prompt into the "Human" dialogue box and click "Run" to test Claude's output.
🌐
Builder.io
builder.io › blog › claude-code
How I use Claude Code (+ my best tips)
September 29, 2025 - I switched from Cursor's agents to Claude Code weeks ago and I'm not going back. Here's how I use it and my best practical tips
🌐
Claude
code.claude.com › docs › en › quickstart
Quickstart - Claude Code Docs
npm install -g @anthropic-ai/claude-code · Claude Code requires an account to use. When you start an interactive session with the claude command, you’ll need to log in: Copy · Ask AI · claude # You'll be prompted to log in on first use · Copy · Ask AI · /login # Follow the prompts to log in with your account · You can log in using either account type: Claude.ai (subscription plans - recommended) Claude Console (API access with pre-paid credits) Once logged in, your credentials are stored and you won’t need to log in again.
Find elsewhere
🌐
Anthropic
anthropic.com › learn › build-with-claude
Anthropic Academy: Claude API Development Guide
Resources to help you get started with Claude, whether you're hacking with us at an event or on your own · Set up your developer account and generate API keys on the Anthropic Console. Use our quickstart guide to make your first API call
🌐
Reddit
reddit.com › r/claudeai › a "just use api" guide
r/ClaudeAI on Reddit: A "Just use API" Guide
December 16, 2024 -

Created the below guide that hopefully will assist those who are interested in trying it out - especially those who are frustrated with the paid Anthropic monthly subscription:

What is an API?

API stands for Application Programming Interface. It's a software intermediary that allows two applications to communicate with each other. Think of it as a messenger that takes your request to a provider and delivers the response back to you. In simpler terms, an API is a set of rules and specifications that allows different software applications to interact and share data, regardless of their underlying technologies.

How to Obtain an Anthropic API Key

Here's a detailed guide to getting your Anthropic API key:

  1. Create an Anthropic Account:

    • Go to the Anthropic website (console.anthropic.com) and sign up for an account or log in if you already have one.

  2. Access the API Keys Section:

    • Once you're logged into your account, navigate to your name/profile icon at the top right of your screen. Look for an option labeled "API Keys".

  3. Generate a New API Key:

    • Click on the button "+ Create Key".

    • You'll be prompted to give your key a name. Enter a name and click "Create Key."

  4. Copy and Secure Your API Key:

    • A long string will be displayed, which is your API key. Copy this key immediately and store it in a safe location. You will not be able to view it again, and you'll need to generate a new one if you lose it.

  5. Set up Billing:

    • I put daily limits on usage – just in case. I recommend you do the same.

Important notes:

  • Security: Treat your API key like a password. Do not share it publicly or embed it directly in your code (if applicable). Use secure methods to store and access it.

  • You can always disable your key and create new ones if you feel any have been compromised.

API Limits - Quick Definitions:

  • Rate (Requests Per Minute - RPM): How often you can send requests (Low to Higher).

  • Context (Max Input Tokens): How much the AI remembers (Smaller to Larger).

  • Output (Max Output Tokens): How long the AI's response can be (Shorter to Longer).

Anthropic Tiers:

  • Tier 1:

    • Very low rate limits (50 RPM).

    • Small per minute context input limit (40k-50K input tokens on 3.5 models). This is the real killer for single users.

    • Shorter responses/output (per min).

    • This tier will make you tear your wig off - avoid.

  • Tier 2

    • Higher rate limits (1000 RPM).

    • Moderate per minute context input limit (80k-100k input tokens on 3.5 models).

    • Longer responses/output (per min).

    • I recommend spending the $40 to get to this at least. The majority of users will probably use up their $40 within 3-6 months. Just a guess on my part FYI. Power users can gobble this up in no time, however.

  • Tier 3:

    • Higher rate limits (2000 RPM).

    • Large per minute context input limit (160k-200k input tokens on 3.5 models).

    • Longer responses/output (per min).

  • Tier 4:

    • Highest rate limits (4,000 RPM), which means it can handle more concurrent requests.

    • Very large per minute context input limit (up to 400k input tokens on all models).

    • Longer responses/output (per min).

    • Currently this is the only tier that allows for 3.5 Sonnet's max context window of 200k input tokens (check my hyper link above to see for yourself).

    • You'll need $400 currently to reach this tier.

WARNING - YOUR API CREDITS EXPIRE AFTER 12 MONTHS FROM PURCHASE.

Anthropic Current Models & Context:

  • Claude 3 Opus:

    • Has a max context window of 200k input tokens. 4K max output tokens.

    • Available on all tiers.

  • Claude 3.5 Sonnet:

    • Has a max context window of 200k input tokens. 8K max output tokens.

    • Available on all tiers.

  • Claude 3.5 Haiku:

    • Has a max context window of 200k input tokens. 8K max output tokens.

    • Available on all tiers.

Tier 4 Advantages for Multiple Users:

Tier 4's primary benefit is its high rate limits, allowing for a total of 400,000 input tokens per minute. This capacity means you could, for example, concurrently run multiple 200,000 input token context models at their maximum. This level of throughput is particularly important for applications that experience a high volume of requests.

Why Tier 4 Matters for High Traffic:

  • Handles Concurrent Requests: Tier 4 is designed to efficiently manage simultaneous requests from many users.

  • Prevents Overloads: Lower tiers can become overwhelmed with a large number of users submitting queries, causing slowdowns. Tier 4 prevents these bottlenecks, ensuring smooth operation.

  • Supports Sustained High Usage: Tier 4 is ideal for applications requiring consistent support for heavy request loads.

Tier 4 for the Single User:

As a single, "power" user, Tier 4 essentially removes all limitations on your usage.

To clarify - Tier 4 allows up to 400k input tokens of TOTAL context per minute. It does NOT allow for any particular model to extend its context input token window capability.

Platforms for Using Anthropic API Keys

Here are some popular platforms, categorized by their nature:

Free Platforms (just a sample of some I use):

  • Anthropic Console Workbench: The Anthropic website itself provides a Workbench where you can experiment with the API directly in your browser. This is a good place to start exploring.

  • TypingMind (Limited): Decent number of features for free - but ads are annoying. Check it out. Free is browser based only I believe.

  • ChatBox (Community Edition): The commercial product is also free and easy to install locally - however read the privacy policy and be sure you are good with it (I'm serious). They have a browser based one here (again, read privacy policy): Chatbox.

  • Msty (Limited): Good free feature set. Nice UI.

Paid Platforms (just a sample of some I use):

  • TypingMind (Full Featured/Lifetime purchase): Onetime payment (try to catch it on sale sub $100) and also has a local install option if you are tech savvy enough. The unique thing about this is that you can utilize things like "Canvas" across multiple API vendors (Anthropic for example).

  • 16x Prompt: I use this for coding heavily. Check it out.

  • Msty (Lifetime): I have not used this, but I have a friend who loves the additional features that the paid version brings.

Open-Source Platforms (just a sample of some I use):

  • Open WebUI: An open-source platform for building AI agents and workflows that supports various model providers, including Claude. Install with pinokio - far easier to get you set up on it if you are unfamiliar with Docker.

  • LibreChat (Advanced Setup): No pinokio installation method as of yet but another incredibly featured free open-sourced product that just released Agents as well. They also released a code interpreter feature that is not free - however if you have a need for something like this you'd understand why (sandboxed environment).

Plenty of vendor options out there I'm sure - just be sure your keys are stored securely and be sure to actually read the Privacy Policy with all of them (I can't stress this enough).

WARNING: This is NOT a thread for devs to blatantly promote their product. I am not associated with ANY of the above recommendations. I have contributed to the Open WebUI platform by creating some popular functions - but that is about it.

Hope this helps!

Edit: Modified some things. Removed my statement regarding my preference for keys not being stored in browsers - again, generally a non-issue for most. Unique issue just for me.

🌐
Medium
medium.com › @yjg30737 › how-to-get-started-with-claude-api-step-by-step-guide-92b5e35ae0a0
How to Get Started with Claude API: Step-by-Step Guide | by Yjg | Medium
September 24, 2024 - To begin, navigate to the Anthropic Console and log in to your account. If you don’t have an account yet, you’ll need to register one.
🌐
Lamatic
blog.lamatic.ai › guides › anthropic-api-vs-claude
A Complete Guide to the Anthropic API vs Claude Web Interface
July 1, 2025 - Contextual Awareness: The model ... to the user's needs. Knowledge Retrieval: With its vast knowledge base, Claude can retrieve and synthesize information from various sources, making it a valuable tool for research, education, and information retrieval tasks. According to a study by Anthropic, Claude achieved a 92% accuracy rate in answering complex questions across various domains, outperforming many other conversational AI models. Console is Anthropic's ...
🌐
Anthropic
anthropic.com
Home \ Anthropic
AI will have a vast impact on the world. Anthropic is a public benefit corporation dedicated to securing its benefits and mitigating its risks. Introducing the best model in the world for coding, agents, computer use, and enterprise workflows.
🌐
Ben's Bites
catalog.bensbites.com › home › improve your prompt engineering with anthropic’s development console
Improve your prompt engineering with Anthropic’s development console | Ben's Bites
To start, we’re going to use Anthropic’s prompt generator tool to generate a few sample prompts for us. To get started, navigate to Anthropic’s developer console and click on the “Generate a prompt” button.
🌐
Learn Prompting
learnprompting.org › blog › upgraded-anthropic-console
Upgraded Anthropic Console
March 18, 2025 - The extended reasoning feature allows users to allocate a specific token budget for the AI's analytical process, providing precise control over the depth of reasoning in applications. This flexibility enables developers to balance processing speed against thoroughness based on their specific application requirements. The updated Console is available to Anthropic ...
🌐
Claude
claude.com › blog › upgraded-anthropic-console
Get to production faster with the upgraded Anthropic Console | Claude
March 6, 2025 - While prompting generally works the same with extended thinking enabled, we've made it easy to optimize prompts to make the most of this new capability. Simply specify the prompt will be used with extended thinking on, and Claude will generate the best responses possible. You can also use the Anthropic Console to control the budget for thinking by setting a max number of thinking tokens.
🌐
Chatbase
chatbase.co › blog › claude-api
How to Access and Use the Claude API
April 11, 2025 - Visit the Anthropic Console and create an account by providing your basic details (name, email, etc.).
🌐
Reddit
reddit.com › r/singularity › [anthropic] you can now generate production-ready prompts in the anthropic console. describe what you want to achieve, and claude will use prompt engineering techniques like chain-of-thought reasoning to create more effective, precise and reliable prompts.
r/singularity on Reddit: [Anthropic] You can now generate production-ready prompts in the Anthropic Console. Describe what you want to achieve, and Claude will use prompt engineering techniques like chain-of-thought reasoning to create more effective, precise and reliable prompts.
May 10, 2024 - Or doesn't use CoT, or general reasoning principals without this type of precise prompting. There should be no need for this. Continue this thread Continue this thread ... Haha! Yes! Sorry to the guy literally just posted his prompt generator. Claude's system prompt is apparently roughly 24,000 tokens long ... Anthropic: A video of all versions of Claude, from the original to 4.5, trying to recreate claude.ai
🌐
Anthropic
anthropic.com › news › enabling-claude-code-to-work-more-autonomously
Enabling Claude Code to work more autonomously
September 29, 2025 - When you rewind to a checkpoint, you can choose to restore the code, the conversation, or both to the prior state. Checkpoints apply to Claude’s edits and not user edits or bash commands, and we recommend using them in combination with version control.
🌐
Obot
obot.ai › home › learning center › anthropic claude api: a practical guide
Anthropic Claude API: A Practical Guide | Obot AI
October 7, 2024 - Log into the Anthropic Console and navigate to the Workbench. Ask Claude a question by typing it into the **User **section.