AI & Agents

Claude 4: Models, Capabilities, and How to Choose

Claude 4 is Anthropic's current-generation model family, spanning three capability tiers with a 25x pricing gap between the cheapest and most expensive option. This guide compares Opus 4.8, Sonnet 4.6, and Haiku 4.5 by context window, thinking mode, latency, and cost, then maps each tier to the workloads where it fits best.

Fast.io Editorial Team 10 min read
AI agent workspace showing collaborative file sharing and model integration

What Claude 4 Includes

Opus 4.8 and Sonnet 4.6 both list 1M-token context windows in Anthropic's model documentation, but a tokenizer change introduced with Opus 4.7 means the same English text generates roughly 30% more tokens on Opus. In practice, Opus 4.8 fits around 555,000 words in its context window while Sonnet 4.6 fits around 750,000 (Anthropic Models Overview, June 2026). That kind of detail doesn't show up in most comparison charts, and it's exactly why picking a Claude 4 model takes more than scanning the price column.

Anthropic launched the Claude 4 generation on May 22, 2025, with two models: Opus 4 and Sonnet 4. Opus 4 scored 72.5% on SWE-bench at launch, while Sonnet 4 hit 72.7%. Over the following year, the family expanded through point releases. The current lineup consists of three tiers: Opus 4.8 (most capable), Sonnet 4.6 (balanced speed and intelligence), and Haiku 4.5 (fastest and cheapest). Each targets a different slice of the complexity spectrum.

Here is how the three current models compare:

Opus 4.8 Sonnet 4.6 Haiku 4.5
Model ID claude-opus-4-8 claude-sonnet-4-6 claude-haiku-4-5-20251001
Context 1M tokens (~555k words) 1M tokens (~750k words) 200k tokens (~150k words)
Max output 128k tokens 64k tokens 64k tokens
Input cost $5 / MTok $3 / MTok $1 / MTok
Output cost $25 / MTok $15 / MTok $5 / MTok
Extended thinking No Yes Yes
Adaptive thinking Yes Yes No
Latency Moderate Fast Fastest
Knowledge cutoff Jan 2026 Aug 2025 Feb 2025

All three models accept text and image input, support multilingual tasks, and are available through the Claude API, Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry. Opus 4.8 has the largest max output at 128k tokens, double what Sonnet and Haiku produce in a single response.

The price gap between tiers is significant. Opus 4.8 output costs 5x more than Sonnet 4.6 and 25x more than Haiku 4.5. For tasks where Sonnet or Haiku produce adequate results, the savings add up fast at scale. A pipeline processing 100 million output tokens per month would spend $2.5 million on Opus, $1.5 million on Sonnet, or $500,000 on Haiku.

One thing to note about context windows: the 1M-token figure for Opus 4.8 and Sonnet 4.6 looks identical on paper, but the newer tokenizer on Opus compresses English text less efficiently. If you're filling a context window with long documents, Sonnet 4.6 holds about 35% more text for the same token count.

Beyond the Claude 4 family, Anthropic released Fable 5 on June 9, 2026, as their most capable widely available model at $10/$50 per MTok. Mythos 5, available through the invitation-only Project Glasswing, sits at the same price point. Both represent the next generation beyond Claude 4 and use 1M-token context windows with 128k max output.

How Extended and Adaptive Thinking Work

The biggest functional difference between Claude 4 models isn't raw intelligence. It's how they reason.

Extended thinking

Extended thinking lets a model work through a problem in a hidden scratchpad before producing visible output. When enabled, the model receives your prompt, spends additional tokens reasoning internally, then generates its response. This is useful for math proofs, complex code generation, multi-step analysis, and anything where working through intermediate steps produces better answers.

Extended thinking is available on Sonnet 4.6 and Haiku 4.5, but not on Opus 4.8. That surprises most developers. The reason is that Opus 4.8 relies on a different approach entirely.

To enable extended thinking via the API, set thinking.type to "enabled" and optionally specify a budget_tokens limit to control how many tokens the model spends reasoning before it starts its visible response.

Adaptive thinking

Adaptive thinking is always on. The model automatically scales its reasoning effort based on task complexity. A simple classification gets minimal internal reasoning. A difficult coding problem gets deep, multi-step analysis. You don't toggle it, and you don't set a thinking budget.

Adaptive thinking is available on Opus 4.8 and Sonnet 4.6. Haiku 4.5 does not support it.

You can influence the reasoning depth by setting the effort parameter to high, medium, or low, but this is optional. On Opus 4.8, effort defaults to high.

Which combination matters

Sonnet 4.6 is the only current model that supports both extended and adaptive thinking. You can use extended thinking for problems where you want explicit control over reasoning depth, or rely on adaptive thinking for general-purpose work. This makes Sonnet the most versatile option for teams handling a range of task complexities within a single application.

In practice, adaptive thinking on Opus 4.8 means you rarely need to configure anything. Send the prompt, and the model allocates effort appropriately. Extended thinking on Sonnet or Haiku gives you direct control: set a token budget, and the model reasons within that constraint before responding.

The performance tradeoff is straightforward. Extended thinking uses more tokens (which cost money) but improves accuracy on hard problems. Adaptive thinking handles this allocation automatically, which simplifies your code but gives you less control over per-request costs.

Neural indexing visualization showing AI processing and reasoning layers

Choosing the Right Model for Your Workload

The right model depends on three factors: task complexity, latency sensitivity, and budget.

Opus 4.8: when accuracy matters most

Opus handles the hardest 10-15% of tasks. Use it for long-horizon agentic coding where the model plans, executes, and verifies across many files. It's the right choice for complex reasoning chains, autonomous workflows with minimal human oversight, and any task that benefits from the 128k output limit.

At the Claude 4 launch, Opus scored 72.5% on SWE-bench. The current Opus 4.8 is Anthropic's top-tier model for agentic coding and has the freshest knowledge cutoff (January 2026). If you're building agents that edit codebases, triage bugs, or generate comprehensive reports, Opus is the tier that minimizes errors on hard problems.

The $5/$25 per MTok pricing sits in the middle of the range. The original Opus 4 launched at $15/$75 per MTok, so the current generation is significantly cheaper per token while being more capable.

Sonnet 4.6: the default for most applications

Sonnet covers the bulk of production use cases. Use it for code generation, document analysis, data extraction, customer-facing chat, and batch processing of medium-complexity tasks.

On SWE-bench Verified, the gap between Opus and Sonnet generations has been as small as 1.2 percentage points. For most workloads, Sonnet delivers comparable quality at 40% lower cost. It also responds faster than Opus, which matters for interactive applications.

Sonnet's support for both extended and adaptive thinking makes it the most flexible model in the lineup. You can tune reasoning depth per request without switching model tiers.

Haiku 4.5: speed and cost at scale

Haiku fills the high-volume, low-latency slot. Use it for classification, routing, intent detection, content moderation, summarization, and real-time chat.

At $1/$5 per MTok, Haiku costs 5x less than Sonnet on output and 25x less than Opus. For applications making thousands of API calls per hour, the savings compound fast. Haiku also supports extended thinking, so you can get deeper reasoning on specific requests without switching to a more expensive model.

The tradeoff is a smaller 200k-token context window and a less recent knowledge cutoff (February 2025). For tasks that require processing long documents or need current-world knowledge, move up to Sonnet or Opus.

A practical framework

Start with Sonnet 4.6. It covers the widest range of tasks at a reasonable price point. Move to Opus 4.8 when you hit accuracy ceilings on complex reasoning or need the 128k output limit. Drop to Haiku 4.5 for high-throughput pipeline stages where speed and cost outweigh peak quality.

Many production systems use all three tiers together. Haiku routes incoming requests and handles simple queries. Sonnet generates content and processes documents. Opus reviews the hardest cases and handles autonomous agent workflows. This tiered approach optimizes both cost and quality across a full workload.

Fastio features

Give your Claude agent a persistent workspace

Fast.io provides 50 GB of free storage, built-in RAG, and an MCP server for file reads, writes, and handoff. No credit card needed.

Getting Started with the Claude 4 API

Claude 4 models are accessible through four platform options:

  • Claude API (direct from Anthropic): The primary endpoint. Supports all features including adaptive thinking, extended thinking, the Batch API, and prompt caching.
  • Amazon Bedrock: Global and regional endpoints. Uses Bedrock-format model IDs like anthropic.claude-sonnet-4-6.
  • Google Cloud Vertex AI: Global, multi-region, and regional endpoints. Model IDs match the Claude API format.
  • Microsoft Foundry: Opus 4.8 has a 200k-token context window on Foundry rather than the full 1M available on other platforms.

Making your first API call

Here's a minimal Python example using the Anthropic SDK:

import anthropic

client = anthropic.Anthropic()

message = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "Explain how TCP handshakes work."}
    ]
)
print(message.content[0].text)

Set your ANTHROPIC_API_KEY environment variable before running. Swap the model parameter to claude-opus-4-8 or claude-haiku-4-5-20251001 to change tiers.

Model IDs and versioning

Starting with the Claude 4.6 generation, model IDs use a dateless format like claude-sonnet-4-6. These are pinned snapshots, not evergreen pointers that auto-update to newer versions. Earlier models like claude-haiku-4-5-20251001 include a date in the ID. The Claude API alias column in Anthropic's docs maps convenience names to specific versions, so claude-haiku-4-5 resolves to claude-haiku-4-5-20251001.

You can discover models programmatically using the Models API, which returns max_input_tokens, max_tokens, and a capabilities object for every available model. This is useful for building applications that dynamically select a model based on required features.

Batch API and extended output

The Batch API supports up to 300,000 output tokens on Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6 by adding the output-300k-2026-03-24 beta header to your request. This is useful for generating long-form reports, comprehensive code reviews, or detailed analysis where 64k or 128k tokens isn't enough. Batch processing also offers discounted pricing compared to the synchronous API.

Prompt caching

For repeated prompts with shared prefixes (like system prompts or reference documents), prompt caching reduces both latency and cost. The first request caches the prefix, and subsequent requests reuse it at a discounted rate. This is especially valuable for agent workflows that send the same context with every API call.

Claude Cowork and Workspace Persistence

Claude 4 models support tool use, parallel tool execution, and multi-step planning out of the box. These capabilities power the growing ecosystem of agent frameworks and collaborative workflows built on Claude.

Claude Code and agentic workflows

Claude Code is Anthropic's terminal-based agent that runs Claude models directly in your development environment. It reads and writes files, runs tests, manages git operations, and calls external tools through the Model Context Protocol (MCP). Claude Code defaults to the Opus tier for complex tasks and can drop to Haiku for quick lookups, matching model capability to task complexity automatically.

Claude Cowork describes the broader pattern of Claude and humans working together in shared environments. Instead of one-shot prompts, agents maintain context across sessions by persisting files, notes, and memory to a workspace that both the agent and human collaborators can access.

Persistence is the hard part

Claude models are stateless. Every API call starts with a blank slate. Agents that need to remember what happened in previous sessions require external persistence for files, context, and output.

For solo development, the local filesystem works fine. Cloud storage like S3 or Google Cloud Storage handles raw file persistence at low cost. But for agent workflows that involve human handoff, shared access, and search over stored files, you need something more structured.

Shared workspaces for agent output

Fast.io fills the gap between raw object storage and full project management platforms. An agent writes files to a workspace, a human reviews them through the same interface, and the built-in RAG layer (Intelligence Mode) lets either party search across everything stored there with citations back to specific documents and pages.

The Fast.io MCP server exposes file operations as tools that Claude can call during agentic tasks, using Streamable HTTP at /mcp or legacy SSE at /sse. When Intelligence Mode is enabled on a workspace, uploaded files are automatically indexed for semantic search and AI chat. No separate vector database required.

The ownership transfer pattern works well for client-facing agent workflows: an agent creates an organization, builds workspaces with deliverables, then transfers ownership to a human client. The agent keeps admin access for ongoing work while the human gets full control of the files.

Fast.io's free agent plan includes 50 GB of storage, 5,000 monthly credits, and 5 workspaces with no credit card, no trial, and no expiration. For teams running Claude agents that need persistent storage alongside human collaboration, it handles the infrastructure so the agent code stays focused on the actual work.

Fast.io Ripley AI responding to a query about workspace documents

Frequently Asked Questions

What is Claude 4?

Claude 4 is Anthropic's fourth-generation model family, released in May 2025. It includes three capability tiers: Opus (most capable), Sonnet (balanced speed and intelligence), and Haiku (fastest and most cost-efficient). All Claude 4 models support text and image input, multilingual tasks, and tool use for agentic workflows.

What are the different Claude 4 models?

The current Claude 4 models are Opus 4.8, Sonnet 4.6, and Haiku 4.5. Opus 4.8 has a 1M-token context window and 128k max output for the most complex tasks. Sonnet 4.6 offers the same 1M-token context window with faster response times and both extended and adaptive thinking. Haiku 4.5 has a 200k-token context window and the fastest latency at the lowest price point.

Which Claude model should I use?

Start with Sonnet 4.6 for most tasks. It covers code generation, document analysis, and general reasoning at a good price. Move to Opus 4.8 when you need deeper reasoning, agentic coding, or 128k-token outputs. Use Haiku 4.5 for high-volume tasks like classification, routing, and real-time chat where speed and cost matter more than peak capability.

How much does Claude 4 cost?

Pricing varies by tier. Haiku 4.5 costs $1 per million input tokens and $5 per million output tokens. Sonnet 4.6 costs $3/$15 per MTok. Opus 4.8 costs $5/$25 per MTok. All models offer discounted rates through the Batch API and prompt caching. The original Opus 4 launched at $15/$75 per MTok, so current pricing represents a significant reduction.

What is the difference between extended thinking and adaptive thinking?

Extended thinking is an opt-in mode where the model reasons in a hidden scratchpad before responding, giving you control over how many tokens it spends thinking. Adaptive thinking is always on and automatically scales reasoning effort to match task complexity. Opus 4.8 uses adaptive thinking only, Haiku 4.5 uses extended thinking only, and Sonnet 4.6 supports both.

What comes after Claude 4?

Fable 5 is Anthropic's most capable widely released model, generally available since June 9, 2026, at $10/$50 per MTok. Mythos 5 is available through the invitation-only Project Glasswing at the same price point. Both use 1M-token context windows and 128k max output, and represent the fifth generation beyond the Claude 4 family.

Related Resources

Fastio features

Give your Claude agent a persistent workspace

Fast.io provides 50 GB of free storage, built-in RAG, and an MCP server for file reads, writes, and handoff. No credit card needed.