27  1M Context is Now Generally Available

Originally published March 13, 2026.

27.1 The End of Context Anxiety

For the first two years of Claude’s existence, context length was the invisible ceiling on what was possible. You could give Claude a research paper, but not a whole codebase. You could include a transcript of a meeting, but not a year of meeting notes. You could paste a function, but not the entire module it depended on.

The 1 million token context window — first introduced as a beta, then expanded to more models — changed this. And as of March 2026, the full 1M context window is generally available for Opus 4.6 and Sonnet 4.6, with no restrictions, no beta headers, and no premium pricing.

27.2 What Changed

27.2.1 Full 1M Context at Standard Pricing

The most important change is economic. During the beta period, using extended context incurred a premium — you paid more per token when your input exceeded the standard window. This created a perverse incentive: developers would spend engineering effort compressing, summarizing, and chunking their inputs to avoid the premium, often degrading quality in the process.

With GA, there is no long-context premium. You pay the same price per token whether your input is 1,000 tokens or 1,000,000 tokens.

Model Input Price (per million tokens) Output Price (per million tokens)
Opus 4.6 $5 $25
Sonnet 4.6 $3 $15

That’s it. No tiers, no breakpoints, no surprises.

27.2.2 Full Rate Limits at Every Context Length

During beta, rate limits for long-context requests were significantly lower than for standard requests. This made it impractical to use 1M context in production — you’d hit rate limits after just a few requests.

With GA, rate limits are the same regardless of context length. If your plan allows 100 requests per minute, you get 100 requests per minute whether each request has 200 tokens or 1 million tokens.

Note

The rate limit change is arguably more important than the pricing change for production users. During beta, teams had to implement complex queuing and backoff strategies to stay within long-context rate limits. Now, long-context requests are treated identically to any other request.

27.2.3 600 Images and PDF Pages

The multimodal context has also expanded. Previously, the limit was 100 images or PDF pages per request. With GA:

Input Type Previous Limit New Limit
Text tokens 200K 1M
Images 100 600
PDF pages 100 600

This makes it practical to:

  • Analyze entire documents — feed a 500-page technical specification
  • Process image collections — analyze hundreds of UI screenshots for consistency
  • Review codebases — include entire repositories as context
  • Compare documents — put multiple large documents in the same context for cross-referencing

27.2.4 No Beta Header Needed

During beta, using the 1M context window required adding a beta header to API requests:

# Old way (beta)
response = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=4096,
    messages=[...],
    extra_headers={"anthropic-beta": "max-tokens-1m-2025-XX-XX"}
)

With GA, no beta header is needed. Just send your request normally:

# New way (GA) — no special headers
response = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=4096,
    messages=[{"role": "user", "content": large_input}],
)

The model automatically handles whatever context length you provide, up to 1M tokens.

27.3 What 1M Tokens Actually Means

It’s hard to intuit what “1 million tokens” represents in practice. Here are concrete examples:

Content Type Approximate Token Count What Fits in 1M
English text ~750,000 words ~3 full novels, or ~1,500 pages
Source code (Python) ~75,000 lines A medium-sized application
PDF pages 600 pages A comprehensive technical specification
Images 600 images A full UI/UX audit collection
Meeting transcripts ~100 hours Several weeks of meetings
Research papers ~500 papers A literature review
Git repository ~50,000 lines A substantial codebase
Tip

1M tokens is roughly equivalent to the complete works of Shakespeare (about 885,000 words). If you need more context than that, you’re probably not solving a single problem — you’re trying to do too much in one request.

27.4 Platform Availability

1M context is available across all major platforms:

Platform Status Configuration
Claude Platform (API) ✅ GA No configuration needed
Amazon Bedrock ✅ GA Set max_tokens parameter
Google Vertex AI ✅ GA Set max_tokens parameter
Microsoft Azure AI Foundry ✅ GA Set max_tokens parameter
Claude Code (Max/Team/Enterprise) ✅ Default Automatically uses 1M

27.4.1 Claude Code Users

For Claude Code Max, Team, and Enterprise users, 1M context is the default. The agent automatically uses the full context window when needed — no configuration required.

This is particularly valuable for:

  • Large codebase navigation — the agent can see the entire project structure
  • Long refactoring sessions — context from early in the session remains available
  • Multi-file changes — understanding dependencies across many files
  • Code review — the full PR diff plus related code fits easily

27.5 Practical Applications

27.5.1 Whole-Codebase Analysis

# Feed an entire codebase for analysis
import anthropic
import os

client = anthropic.Anthropic()

# Read all Python files in a project
codebase = ""
for root, dirs, files in os.walk("src/"):
    for file in files:
        if file.endswith(".py"):
            path = os.path.join(root, file)
            with open(path) as f:
                codebase += f"\n\n# File: {path}\n{f.read()}"

response = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=8192,
    messages=[{
        "role": "user",
        "content": f"""Analyze this codebase for:
1. Potential security vulnerabilities
2. Performance bottlenecks
3. Code duplication
4. Missing error handling
5. Architectural improvements

Codebase:
{codebase}""",
    }],
)

27.5.2 Document Comparison

# Compare multiple large documents
contract_1 = open("vendor_a_contract.pdf").read()
contract_2 = open("vendor_b_contract.pdf").read()
contract_3 = open("current_contract.pdf").read()

response = client.messages.create(
    model="claude-opus-4-6",
    max_tokens=8192,
    messages=[{
        "role": "user",
        "content": f"""Compare these three contracts:

CURRENT CONTRACT:
{contract_1}

VENDOR A:
{contract_2}

VENDOR B:
{contract_3}

Create a comparison table covering:
- Pricing terms
- Liability clauses
- IP ownership
- Termination conditions
- Data protection provisions""",
    }],
)

27.5.3 Research Literature Review

# Process hundreds of research papers
papers = []
for paper_file in os.listdir("research_papers/"):
    papers.append(open(f"research_papers/{paper_file}").read())

all_papers = "\n\n---\n\n".join(papers)

response = client.messages.create(
    model="claude-opus-4-6",
    max_tokens=16384,
    messages=[{
        "role": "user",
        "content": f"""Conduct a literature review of these papers.
Identify:
1. Key themes and trends
2. Areas of consensus
3. Points of disagreement
4. Gaps in the research
5. Most cited methodologies

Papers:
{all_papers}""",
    }],
)

27.6 When to Use Long Context (and When Not To)

Long context is powerful, but it’s not always the right tool. Here’s a decision framework:

27.6.1 Use Long Context When:

  • You need holistic understanding — the relationships between documents matter
  • Chunking loses information — the connections between parts are as important as the parts themselves
  • You’re doing analysis or synthesis — comparing, summarizing, finding patterns
  • The cost of missing context is high — security review, legal analysis, medical review

27.6.2 Avoid Long Context When:

  • You only need specific information — a targeted search or retrieval would be more efficient
  • The content is repetitive — 500 nearly identical log entries don’t add value
  • Latency matters — longer contexts take longer to process
  • You’re doing many independent queries — each would be cheaper as a separate small request
Note

Even with no price premium per token, a 1M token request costs more in absolute terms than a 10K token request — because there are more tokens. The question isn’t “can I afford the context?” but “does the context add value?”

27.6.3 The Retrieval + Long Context Pattern

The most effective pattern for many applications combines retrieval with long context:

# 1. Use embeddings to find relevant chunks
relevant_chunks = vector_db.search(query, top_k=50)

# 2. Feed all relevant chunks to Claude with full context
response = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=4096,
    messages=[{
        "role": "user",
        "content": f"""Based on these relevant documents, answer:

{query}

Relevant context:
{format_chunks(relevant_chunks)}""",
    }],
)

This gives you the precision of retrieval (finding the right information) with the understanding of long context (seeing how it all fits together).

27.7 Performance Characteristics

27.7.1 Latency by Context Length

Input Tokens Time to First Token Notes
1K ~0.5s Near-instant
10K ~0.8s Fast
100K ~3s Noticeable but acceptable
500K ~12s Requires UX consideration
1M ~25s Show a loading indicator

27.7.2 Quality Across Context Length

A common concern is whether Claude “remembers” information at the beginning of a very long context. Independent benchmarks have shown that Claude’s recall across the full 1M window is strong — there’s no significant degradation for information at the beginning versus the end of the context.

However, best practice remains to put the most important information at the beginning or end of the prompt, as these positions have marginally better recall in any language model.

27.8 Migration from Beta

If you were using the 1M context beta, migration is simple:

  1. Remove the beta header from your API calls
  2. Update your rate limit handling — you now have full rate limits
  3. Review your cost projections — standard pricing may be cheaper than your beta pricing
  4. Remove any context-chunking workarounds — you no longer need to split inputs to avoid the premium
# Before (beta)
response = client.messages.create(
    model="claude-sonnet-4-6",
    messages=[...],
    extra_headers={"anthropic-beta": "max-tokens-1m-2025-XX-XX"}
)

# After (GA) — just remove the header
response = client.messages.create(
    model="claude-sonnet-4-6",
    messages=[...],
)

27.9 Common Patterns and Anti-Patterns

27.9.1 Effective Patterns

The Large Document Q&A — Load a comprehensive document once, then ask many questions:

# Load once, query many times
document = load_large_pdf("specification.pdf")  # ~200K tokens

conversation = client.conversations.create(
    model="claude-sonnet-4-6",
    initial_context=document,
)

# First question
q1 = conversation.ask("What are the security requirements?")
# Second question (context is retained)
q2 = conversation.ask("How does the auth flow work?")
# Third question
q3 = conversation.ask("What are the error handling conventions?")

This is more efficient and more accurate than re-sending the document with each question.

The Multi-Perspective Analysis — Load the same document with different system prompts for different analyses:

# Security perspective
security_review = client.messages.create(
    model="claude-opus-4-6",
    system="You are a security auditor. Find vulnerabilities.",
    messages=[{"role": "user", "content": codebase}],
)

# Performance perspective
perf_review = client.messages.create(
    model="claude-opus-4-6",
    system="You are a performance engineer. Find bottlenecks.",
    messages=[{"role": "user", "content": codebase}],
)

27.9.2 Anti-Patterns to Avoid

Anti-Pattern Why It’s Bad Better Approach
Stuffing everything Drowns relevant info in noise Use retrieval first, then long context
Repeating large context Wastes tokens on each call Use conversation caching
Ignoring latency 1M tokens = ~25s to first token Show loading indicators, stream responses
No quality checks Assumes all output is correct Always validate critical outputs
Tip

The teams that get the most value from long context are those that use it deliberately — choosing it when holistic understanding matters, and using more targeted approaches when precision matters. Long context is a tool, not a default.

27.10 Key Takeaways

  • 1M context is generally available for Opus 4.6 and Sonnet 4.6 — no beta, no restrictions.
  • No long-context premium — standard pricing applies at every context length: Opus $5/$25, Sonnet $3/$15 per million tokens.
  • Full rate limits at every context length — no more queuing or backoff for long-context requests.
  • 600 images or PDF pages per request (up from 100) — practical for large document analysis.
  • No beta header needed — just send your request normally.
  • Available everywhere: Claude Platform, Amazon Bedrock, Google Vertex AI, and Microsoft Azure AI Foundry.
  • Claude Code Max/Team/Enterprise users get 1M context by default, automatically.
  • 1M tokens ≈ 750,000 words, 75,000 lines of code, or 600 PDF pages — enough for most entire codebases, document collections, or research corpora.
  • Combine retrieval with long context for the best results — find the right information, then let Claude understand it holistically.