The Claude AI Community Discord is open.Join us

Setting Up Your Account

8 min readIntroduction

Let's get you set up with the Anthropic API so you can start building with Claude.

Step 1: Create an Account

Visit the Anthropic Console and create your account. You will need:

  • A valid email address
  • A payment method (for API usage)

Step 2: Get Your API Key

Once logged in:

  1. Navigate to API Keys in the sidebar
  2. Click Create Key
  3. Give it a descriptive name (e.g., my-first-app)
  4. Copy and save the key securely

Important: Never commit your API key to version control. Use environment variables instead.

Step 3: Install the SDK

# Python
pip install anthropic

# TypeScript/JavaScript
npm install @anthropic-ai/sdk

Step 4: Test Your Setup

import anthropic

client = anthropic.Anthropic()

message = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "Hello, Claude!"}
    ]
)

print(message.content[0].text)

If you see a response, you are all set!