How to Manage Your Anthropic Account and API Keys: A Practical Guide
Learn how to navigate the Anthropic Console, create and manage API keys, set up billing, and configure your organization settings for Claude API access.
This guide walks you through setting up your Anthropic account, generating and securing API keys, configuring billing, and managing organization settings so you can start using the Claude API effectively.
Introduction
Before you can start building with Claude, you need to set up your Anthropic account and configure your API access. Whether you're an individual developer or part of a larger organization, understanding the Anthropic Console—your central hub for account management—is essential. This guide covers everything from account creation to API key management, billing setup, and organization administration.
What is the Anthropic Console?
The Anthropic Console (console.anthropic.com) is the web-based dashboard where you manage your Claude API usage. It provides:
- API key generation and management – Create, view, and revoke keys
- Billing and usage monitoring – Track your spending and set limits
- Organization settings – Manage team members and roles
- API documentation and playground – Test prompts and explore endpoints
Step 1: Creating Your Account
- Navigate to console.anthropic.com
- Click Sign Up and enter your email address
- Verify your email via the confirmation link sent to your inbox
- Complete your profile (name, organization name if applicable)
- Accept the terms of service
Tip: Use a work email if you plan to collaborate with a team—it makes organization management easier later.
Step 2: Generating Your First API Key
Once logged in, you'll land on the Dashboard. To create an API key:
- Click API Keys in the left sidebar
- Click Create API Key
- Give your key a descriptive name (e.g., "Production App", "Local Dev")
- Copy the key immediately—it will only be shown once
# Example: Using your API key in Python
import anthropic
client = anthropic.Anthropic(
api_key="sk-ant-..." # Replace with your actual key
)
message = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=[
{"role": "user", "content": "Hello, Claude!"}
]
)
print(message.content)
API Key Security Best Practices
- Never hardcode keys in your source code. Use environment variables or a secrets manager.
- Rotate keys regularly – Generate new keys and revoke old ones every 90 days.
- Use separate keys for development, staging, and production environments.
- Monitor key usage – The Console shows which keys are being used and how much.
# Recommended: Store your API key in an environment variable
export ANTHROPIC_API_KEY="sk-ant-..."
Then in your code:
import os
import anthropic
client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])
Step 3: Setting Up Billing
To use the Claude API beyond the free trial, you need to add a payment method:
- Go to Billing in the left sidebar
- Click Add Payment Method
- Enter your credit card details (Visa, Mastercard, or Amex are supported)
- Set a spend limit to avoid unexpected charges
Understanding Pricing
Claude API pricing is based on tokens—both input (the prompt you send) and output (the response). As of this writing:
- Claude Sonnet 4: $3.00 per million input tokens, $15.00 per million output tokens
- Claude Haiku 3.5: $0.80 per million input tokens, $4.00 per million output tokens
# Quick cost estimation example
def estimate_cost(input_tokens, output_tokens, model="claude-sonnet-4-20250514"):
if "sonnet" in model:
input_cost = (input_tokens / 1_000_000) * 3.00
output_cost = (output_tokens / 1_000_000) * 15.00
elif "haiku" in model:
input_cost = (input_tokens / 1_000_000) * 0.80
output_cost = (output_tokens / 1_000_000) * 4.00
else:
return "Unknown model"
return round(input_cost + output_cost, 4)
Example: 10,000 input tokens, 2,000 output tokens with Sonnet
print(estimate_cost(10000, 2000)) # Output: 0.06 (6 cents)
Step 4: Managing Your Organization
If you're working with a team, you can create an organization to share API keys and billing:
- Click your profile icon (top-right) → Settings
- Under Organization, click Create Organization
- Give it a name and invite members by email
- Assign roles:
Organization Benefits
- Shared billing – One payment method for the whole team
- Granular permissions – Control who can create keys or view billing
- Usage aggregation – See total usage across all team members
Step 5: Monitoring Usage and Logs
The Console provides detailed logs of your API requests:
- Go to Logs in the sidebar
- Filter by date, model, API key, or status code
- Click any log entry to see the full request and response
// Example: Fetching usage data via the Admin API (if available)
// Note: This is a conceptual example—check docs for current endpoints
const response = await fetch('https://api.anthropic.com/v1/admin/usage', {
headers: {
'x-api-key': 'YOUR_ADMIN_KEY',
'anthropic-version': '2023-06-01'
}
});
const data = await response.json();
console.log(Total tokens used this month: ${data.total_tokens});
Troubleshooting Common Issues
"Invalid API Key" Error
- Ensure you copied the key correctly (they start with
sk-ant-) - Check that the key hasn't been revoked
- Verify you're using the correct key for the right environment
"Insufficient Quota" Error
- Check your billing setup – you may need to add a payment method
- Review your spend limit – you may have hit it
- Upgrade your plan if needed
"Rate Limit Exceeded" Error
- Implement exponential backoff in your code
- Consider batching requests
- Contact Anthropic support if you need higher limits
Key Takeaways
- Create separate API keys for different environments and label them clearly to track usage
- Always use environment variables or a secrets manager to store your API keys—never hardcode them
- Set a spend limit in the Billing section to avoid surprise charges
- Leverage organization features if working with a team to share billing and control access
- Monitor your logs regularly to catch errors, optimize costs, and debug issues early