The Claude 4 Model Family
Anthropic offers three models optimised for different speed, capability, and cost trade-offs. Choosing the right model for each task is critical for building efficient production systems.
Claude Opus 4.6
Most capable model. Best for complex reasoning, nuanced analysis, and agentic tasks that require deep judgment. Highest cost, slowest speed.
claude-opus-4-6
Claude Sonnet 4.6
Best balance of intelligence and speed. Ideal for most production workloads: coding, data extraction, document analysis, customer support.
claude-sonnet-4-6
Claude Haiku 4.5
Fastest and most cost-efficient. Best for high-throughput applications, simple classification, quick summaries, and latency-sensitive tasks.
claude-haiku-4-5-20251001
Start development with Sonnet. Upgrade to Opus only for tasks where quality materially differs. Use Haiku for pre-processing, routing, classification, and any latency-sensitive path. The cost difference between Haiku and Opus is roughly 10x.
All prices shown are per 1 million tokens (input / output) and were current as of April 2026. Verify the latest rates at anthropic.com/pricing before building cost models.
ShopMate -- Model Router
# shopmate/router.py -- Right model for each ShopMate task from enum import Enum class Task(Enum): CLASSIFY = "classify" # sentiment check, category label WRITE = "write" # product descriptions, email replies CAMPAIGN = "campaign" # seasonal campaign copy, Maya reviews # Model choice + max tokens per task ROUTING = { Task.CLASSIFY: ("claude-haiku-4-5-20251001", 30), # fastest, cheapest Task.WRITE: ("claude-haiku-4-5-20251001", 250), # good quality, low cost Task.CAMPAIGN: ("claude-sonnet-4-6", 800), # best quality for Maya } # Cost per 1 million tokens (input / output) — verify at anthropic.com/pricing PRICES = { "claude-haiku-4-5-20251001": (0.80, 4.00), # $0.80 input / $4.00 output per 1M tokens "claude-sonnet-4-6": (3.00, 15.00), # $3.00 input / $15.00 output per 1M tokens } def route(task: Task) -> tuple[str, int]: return ROUTING[task] def monthly_cost_estimate() -> None: volumes = {Task.CLASSIFY: 2000, Task.WRITE: 500, Task.CAMPAIGN: 8} total = 0 print(f"{'Task':<15} {'Model':<35} {'Vol':>5} {'Cost':>8}") print("-" * 68) for task, vol in volumes.items(): model, max_out = ROUTING[task] cin, cout = PRICES[model] cost = ((400/1e6)*cin + (max_out/1e6)*cout) * vol total += cost print(f"{task.value:<15} {model:<35} {vol:>5} ${cost:>7.2f}") print(f" Estimated monthly total: ${total:.2f}") monthly_cost_estimate()