Skip to main content
Field Guide

How to Get Access to the Claude API (2026 Guide)

This guide shows you how to get access to the Claude API, Anthropic’s developer platform for building applications on Claude — the same models that power Claude.ai and Claude Code, available programmatically through a single endpoint. It walks you through getting an API key, current pricing across the Claude lineup, rate-limit tiers, and your first working API call. No waitlist, no approval queue: most developers go from sign-up to first response in under ten minutes.

What is the Claude API?

The Claude API exposes Anthropic’s models over a single /v1/messages endpoint. You send a list of messages, Claude responds — and tools, vision, structured outputs, and streaming are all features of that one endpoint rather than separate APIs. It’s the same model family behind Claude.ai and Claude Code, but accessed from your own code.

If you’re choosing a ready-made coding assistant rather than building your own integration, start with our best AI coding agents of 2026 comparison. This guide is for getting programmatic access.

How to Get Access to the Claude API (Step by Step)

  1. Create an Anthropic account. Go to console.anthropic.com and sign up with an email or Google account. Access is open — there’s no waitlist.
  2. Set up your organization. The Console groups usage, billing, and API keys under an organization, created automatically on sign-up.
  3. Add a payment method and credits. The API is prepaid and usage-based. Add a card under Billing and buy an initial credit balance — even a few dollars is enough to test thoroughly.
  4. Create an API key. Under API Keys, click Create Key. Copy it immediately; it’s shown only once. Store it as the environment variable ANTHROPIC_API_KEY and never hard-code it into source.
  5. Make your first call using the example below.

Claude API Pricing (2026)

Pricing is per million tokens (MTok), billed separately for input (your prompt) and output (Claude’s response). These are the current first-party API rates:

Model Model ID Context Input ($/MTok) Output ($/MTok)
Claude Fable 5 claude-fable-5 1M $10.00 $50.00
Claude Sonnet 5 claude-sonnet-5 1M $2.00* $10.00*
Claude Opus 4.8 claude-opus-4-8 1M $5.00 $25.00
Claude Sonnet 4.6 claude-sonnet-4-6 1M $3.00 $15.00
Claude Haiku 4.5 claude-haiku-4-5 200K $1.00 $5.00

*Claude Sonnet 5 (released June 30, 2026) is priced at an introductory $2.00 / $10.00 per MTok through August 31, 2026, after which it moves to standard Sonnet-tier pricing of $3.00 / $15.00 per MTok.

You can cut input costs by up to ~90% with prompt caching (reusing a stable system prompt across requests) and 50% with the Batches API for work that doesn’t need a real-time response. For a full cross-provider breakdown, see our LLM API pricing reference.

Which Claude model should you use?

  • Claude Opus 4.8 — the default for most work. The most capable Opus-tier model, with a 1M-token context window. Deep dive: Claude Opus 4.8 API review.
  • Claude Sonnet 4.6 — the best speed/cost balance for production and high-volume workloads. See the Claude Sonnet API review.
  • Claude Haiku 4.5 — fastest and cheapest, ideal for simple, latency-sensitive tasks like classification.
  • Claude Fable 5 — reserved for the most demanding reasoning and long-horizon agentic work; pricing sits above the Opus tier.

Rate Limits and Usage Tiers

New accounts start at a low usage tier and graduate automatically as your account ages and as you spend. Higher tiers raise your requests-per-minute (RPM) and tokens-per-minute (TPM) ceilings. If you hit a 429 error you’ve exceeded your tier’s limit — the response includes a retry-after header, and the official SDKs retry with exponential backoff automatically. To raise limits faster, add credits or contact Anthropic for enterprise volume.

Your First Claude API Call (Python)

Install the SDK with pip install anthropic, set ANTHROPIC_API_KEY in your environment, then:

import anthropic

client = anthropic.Anthropic()  # reads ANTHROPIC_API_KEY from the environment

response = client.messages.create(
    model="claude-opus-4-8",
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "In one sentence, what is the Claude API?"}
    ],
)
print(response.content[0].text)

Official SDKs are available for Python, TypeScript, Java, Go, Ruby, C#, and PHP, plus a raw HTTP interface for any other language.

Claude API vs Claude Pro: Which Do You Need?

  • Claude Pro / Max (subscription) — for using Claude through the chat app and Claude Code at a flat monthly fee.
  • Claude API (usage-based) — for building Claude into your own app or script, paying per token.

If you only want to chat with Claude or use it as a coding assistant, you want the subscription — see ChatGPT Plus vs Claude Pro. If you’re writing code that calls Claude, you want the API.

Frequently Asked Questions

How do I get access to the Claude API?

Sign up at the Claude Console (platform.claude.com / console.anthropic.com), add a payment method under Billing, and generate an API key under API Keys. Access is self-serve with no waitlist or approval step — most developers can make their first API call within minutes of signing up.

Is there a free tier for the Claude API?

There’s no perpetual free tier, but the API is pay-as-you-go and new accounts can start with a small credit balance, so you only pay for what you use. Testing costs cents.

Do I need to be approved or join a waitlist?

No. API access is open — create an account, add a payment method, and generate a key.

How much does it cost to get started with the Claude API?

You can begin testing for a few dollars. A short prompt-and-response on Haiku 4.5 costs a fraction of a cent; even Opus 4.8 is inexpensive for typical request sizes.

What’s the difference between the Claude models?

Fable 5 is the most capable (and most expensive); Opus 4.8 is the default high-capability tier; Sonnet 4.6 balances speed and cost; Haiku 4.5 is the fastest and cheapest. All four use the same API.

How do I keep my Claude API key secure?

Store it as an environment variable, never commit it to source control, and rotate it from the Console immediately if it’s ever exposed.

Last reviewed: June 2026. Pricing and model availability change — verify current rates at console.anthropic.com before relying on them.