Skip to content
English

Switch theme

// Models · API key guide

Anthropic API key (Claude Console)

Keys are generated in the Claude Console (platform.claude.com). API usage is paid with prepaid credits.

5 stepsofficial docs onlychecked 2026-10-26

01How to get a Anthropic Claude API key

  1. Create a Claude Console account at platform.claude.com.
  2. Try models in the Workbench / playground (platform.claude.com/playground) if you like.
  3. Settings → API keys → Create key; pick the workspace it belongs to.
  4. Billing → “Buy credits” – without credits you cannot call the API.
  5. Call https://api.anthropic.com/v1/messages with headers x-api-key and anthropic-version: 2023-06-01.

Official key page: https://platform.claude.com/settings/keys – console labels may change; follow what the official page shows.

02Real-name, phone and credit card requirements

Real-name / ID verificationNot mentioned in the docs we checked.
Phone numberNot mentioned in the docs we checked (以官方为准).
Credit card / paymentYou must buy prepaid credits before using the API (payment on the Console billing page). Organisations with invoicing are billed monthly.

03Base URL and a minimal call

Base URL:https://api.anthropic.com
Environment variable:ANTHROPIC_API_KEY · Example model:claude-haiku-5-5
Model IDs from the official models overview: claude-fable-5-1, claude-opus-5-5, claude-sonnet-5-5, claude-haiku-5-5.

curl

curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-haiku-5-5",
    "max_tokens": 256,
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Python

# pip install anthropic
import anthropic

client = anthropic.Anthropic()  # reads ANTHROPIC_API_KEY
msg = client.messages.create(
    model="claude-haiku-5-5",
    max_tokens=256,
    messages=[{"role": "user", "content": "Hello"}],
)
print(msg.content[0].text)

No free tier is described in the official billing article: usage is paid with prepaid credits, and when they run out you can no longer call the API. Claude Max and Team plans include monthly API credits when you link a Console organisation.

05Anthropic Claude API prices

All model prices →
ModelInput / 1M tokensOutput / 1M tokensSource
Claude Haiku 5.5claude-haiku-5-5 $0.1$0.5 official · 2026-10-10
Claude Haiku 3.5claude-3-5-haiku $0.8$4 official · 2026-10-10
Claude Haiku 4.5claude-haiku-4-5 $1$5 official · 2026-10-10
Claude Sonnet 5.5claude-sonnet-5-5 $2$10 official · 2026-10-10
Claude Sonnet 5claude-sonnet-5 $2$10 official · 2026-10-10
Claude Sonnet 4.6claude-sonnet-4-6 $3$15 official · 2026-10-10
Claude Sonnet 4.5claude-sonnet-4-5 $3$15 official · 2026-10-10
Claude Sonnet 4claude-sonnet-4 $3$15 official · 2026-10-10

Standard (non-batch) list prices from our price database; cheapest first, max 8 rows. Prices change – the official page wins.

06Keep your API key safe

07FAQ

FAQ

Where is the Anthropic Console?

platform.claude.com (keys at platform.claude.com/settings/keys).

Is there a free Claude API key?

The official billing article describes prepaid credits only; without credits the API cannot be called. Max/Team plans include monthly API credits.

Which headers does the Claude API need?

x-api-key (or Authorization: Bearer), anthropic-version: 2023-06-01 and content-type: application/json.

08Official sources

All facts checked against these pages on 2026-10-26. If anything differs, the official page wins.

09Related

Other API key guides

Data updated: Model API prices · HF model metadata(UTC+8)