Back to API Keys Guide
🟣

How to Get an Anthropic API Key

Step-by-step guide for Claude 3.5 Sonnet, Claude 3 Opus, and Claude 3 Haiku

2-3 minutes
$5 free credits
Credit card required
Before You Start
  • A valid email address
  • Phone number for verification
  • Credit card for account verification
Note: Anthropic requires a credit card to create an API account, but new accounts receive $5 in free credits. You won't be charged until you exceed these credits.

Step-by-Step Instructions

1

Go to Anthropic Console

Visit the Anthropic API console at:

console.anthropic.com/signup
Note: The API console (console.anthropic.com) is different from Claude.ai. You need an API account to use Claude programmatically.
2

Create Your Account

Sign up using:

  • Email: Enter your email and create a password
  • Google: Sign up with your Google account

You'll receive a verification email. Click the link to verify your account.

3

Verify Your Phone Number

Anthropic requires phone verification for security. Enter your phone number and the verification code you receive via SMS.

4

Add Payment Method

To access the API, you'll need to add a credit card:

  1. Go to Settings → Billing
  2. Click "Add payment method"
  3. Enter your credit card details
Free Credits: New accounts receive $5 in free API credits. Your card will only be charged after you exceed this amount.
5

Generate Your API Key

  1. Go to Settings → API Keys or visit console.anthropic.com/settings/keys
  2. Click "Create Key"
  3. Give your key a name (e.g., "AI Assess Tech Testing")
  4. Click "Create Key"
Important! Your API key will only be shown once. Copy it immediately and store it somewhere safe. You cannot view the full key again.
6

Copy Your API Key

Your API key will look something like this:

sk-ant-api03-aBcDeFgHiJkLmNoPqRsTuVwXyZ...

Click the copy button to copy it to your clipboard.

Using Your API Key with AI Assess Tech

Now that you have your API key, you can use it with AI Assess Tech:

Option 1: Demo Tool (aiassessmenttool.com)

  1. Go to aiassessmenttool.com
  2. Select "Anthropic" as your provider
  3. Paste your API key in the API Key field
  4. Choose your model (Claude 3 Haiku recommended for cost)
  5. Click "Start Assessment"

Option 2: SDK Integration

import Anthropic from '@anthropic-ai/sdk';
import { AIAssessClient } from '@aiassesstech/sdk';

const anthropic = new Anthropic({
  apiKey: process.env.ANTHROPIC_API_KEY
});

const client = new AIAssessClient({
  healthCheckKey: process.env.AIASSESS_KEY
});

const result = await client.assess(async (question) => {
  const response = await anthropic.messages.create({
    model: 'claude-haiku-4-5',
    max_tokens: 100,
    messages: [{ role: 'user', content: question }]
  });
  return response.content[0].type === 'text' 
    ? response.content[0].text 
    : '';
});
Anthropic Pricing (as of 2026)
ModelInput (per 1M tokens)Output (per 1M tokens)Est. Cost per Assessment
Claude 3 Haiku Recommended$0.25$1.25~$0.02
Claude 3.5 Sonnet$3.00$15.00~$0.25
Claude 3 Opus$15.00$75.00~$1.20

Prices are approximate and may change. Check anthropic.com/pricing for current rates.

Troubleshooting

"Invalid API Key" error

Make sure you copied the entire key including the "sk-ant-" prefix. Check for any extra spaces before or after the key.

"Rate limit exceeded" error

Anthropic has rate limits based on your account tier. Wait a minute and try again.

"Credit balance too low" error

Your free credits may have been used. Add more credits atconsole.anthropic.com/settings/billing.

Ready to Test Your AI?

Now that you have your Anthropic API key, you can run your first AI ethical assessment: