LLM Reference
Anthropic

Claude 2 on Anthropic

Claude 2 · Anthropic

Serverless

Last refreshed 2026-05-11. Next refresh: weekly.

Why use Claude 2 on Anthropic?

Anthropic offers Claude 2 with pay-as-you-go pricing at $8.00/1M input tokens. Anthropic is a safety-focused AI research company and creator of the Claude model family, offering API access through the Anthropic Console for text generation, analysis, and coding tasks.

Compare Claude 2 across 2 providers to find the best fit for your use case
Input / 1M
$8.00
Output / 1M
$24.00
Cache
Not sourced
Batch
Not sourced

Setup recipe

Python + curl
Install
pip install anthropic
Auth
export ANTHROPIC_API_KEY=...
Call
import anthropic
client = anthropic.Anthropic()  # reads ANTHROPIC_API_KEY from env
message = client.messages.create(
    model="claude-2",
Model ID
claude-2

Request example

import anthropic

client = anthropic.Anthropic()  # reads ANTHROPIC_API_KEY from env
message = client.messages.create(
    model="claude-2",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}]
)
print(message.content[0].text)

Gotchas

  • Use the versioned model ID, e.g. "claude-sonnet-4-6" or "claude-opus-4-7-20251101".
  • The examples expect ANTHROPIC_API_KEY; rename it only if your application config maps the new variable.

Compare Claude 2 Across Providers

ProviderInput (per 1M)Output (per 1M)
AWS Bedrock$8.00$24.00
Anthropic$8.00$24.00

Pricing

TypePrice (per 1M)
Input tokens$8.00
Output tokens$24.00

Capabilities

Structured Outputs

About Claude 2

Claude 2, crafted by Anthropic, represents a leap forward in large language model technology, striving to be helpful, harmless, and honest. It's recognized for its improved performance, longer responses, and a remarkable 100,000-token context window, allowing it to handle extensive text inputs with ease. Excelling in coding, math, and reasoning tasks, Claude 2 performs exceptionally on standardized tests like the Bar exam and GRE. Despite its achievements, it faces challenges such as generating inaccurate information ("hallucinations") and simulating emotional responses rather than possessing true empathy. The model's knowledge extends up to early 2023, so it might miss the latest updates. While not immune to "jailbreaks," it aims to enhance AI safety significantly 135.

FAQ

What does Claude 2 cost on Anthropic?

On Anthropic, Claude 2 costs $8 per 1M input tokens and $24 per 1M output tokens.

What is the context window for Claude 2 on Anthropic?

Claude 2 supports a 100,000 token context window on Anthropic.

How does Anthropic compare to other Claude 2 providers?

Claude 2 is available from 2 providers. The cheapest input pricing is $8/1M tokens from AWS Bedrock.

Who created Claude 2?

Claude 2 was created by Anthropic as part of the Claude 2 model family.

Is Claude 2 open source?

Claude 2's open source status is unknown in the seed data.

Get Started

Model Specs

Released2023-07-11
Context100K
ArchitectureDecoder Only
Knowledge cutoff2023-01

Related Models on Anthropic