Post-Shutdown Guide

What Replaced Claude 4? — Complete Guide to Every Alternative

Published June 15, 2026 · 8 min read · Updated as needed

⚡ The Short Answer

Claude 4 Opus → Claude Opus 4.8 ($5/$25 — 67% cheaper)
Claude Sonnet 4 → Claude Sonnet 4.6 ($3/$15 — same price, 5x context)

Same API key. Same SDK. Just change the model name string. No other code changes needed.

Claude 4 Opus and Claude Sonnet 4 were retired on June 15, 2026. If your app is broken right now, you're seeing HTTP 410 errors or "model not found" messages. This guide explains exactly what replaced Claude 4, how to migrate, and which alternative saves you the most money.

What Replaced Claude 4 Opus?

Claude Opus 4.8 is the direct replacement. Here's the comparison:

Model Input / 1M tokens Output / 1M tokens Context Savings
Claude 4 Opus RETIRED $15.00 $75.00 200K
Claude Opus 4.8 REPLACEMENT $5.00 $25.00 1M 67% cheaper
Claude Opus 4.7 $5.00 $25.00 1M 67% cheaper

Opus 4.8 is not just cheaper — it's better. You get a 1M context window (5x the 200K of Claude 4 Opus), improved reasoning, and faster response times. The only downside is that it costs less, which means Anthropic is positioning it as the new flagship.

What Replaced Claude Sonnet 4?

Claude Sonnet 4.6 replaces Sonnet 4:

Model Input / 1M tokens Output / 1M tokens Context Savings
Claude Sonnet 4 RETIRED $3.00 $15.00 200K
Claude Sonnet 4.6 REPLACEMENT $3.00 $15.00 1M Same price, 5x context

Sonnet 4.6 is the same price but with a 1M context window (up from 200K). This is a pure upgrade — more context, same cost.

The One-Line Fix

If you're using the Anthropic API directly, the fix is a single string change:

# Before (broken — you're seeing this now)
model = "claude-4-opus" # or "claude-4-sonnet"
# → HTTP 410 Gone: "claude-4-opus has been deprecated"

# After (fixed — works immediately)
model = "claude-opus-4-8" # or "claude-sonnet-4-6"
# → Works. Same API key. Same SDK. Just a new model name.

Python

# Before
response = client.messages.create(
  model="claude-4-opus",
  messages=[{"role": "user", "content": "Hello"}]
)

# After — only the model name changes
response = client.messages.create(
  model="claude-opus-4-8",
  messages=[{"role": "user", "content": "Hello"}]
)

Node.js / TypeScript

// Before
const response = await client.messages.create({
  model: "claude-4-sonnet",
  messages: [{ role: "user", content: "Hello" }]
});

// After
const response = await client.messages.create({
  model: "claude-sonnet-4-6",
  messages: [{ role: "user", content: "Hello" }]
});

cURL

# Before
curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -d '"model": "claude-4-opus"'

# After
curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -d '"model": "claude-opus-4-8"'

All Claude 4 Alternatives Ranked by Cost

If you want to save even more than the 67% from switching to Opus 4.8, here are 12 alternatives ranked by cost savings vs Claude 4 Opus:

# Model Provider Input / 1M Output / 1M Savings vs Claude 4 Opus
1 Gemini 2.0 Flash Lite Google $0.075 $0.30 99.6%
2 Gemini 2.5 Flash-Lite Google $0.10 $0.40 99.5%
3 DeepSeek V4 Flash DeepSeek $0.14 $0.28 99.6%
4 Mistral Small 4 Mistral $0.10 $0.30 99.6%
5 Llama 4 Scout Meta $0.18 $0.59 99.2%
6 DeepSeek V4 Pro DeepSeek $0.44 $0.87 98.8%
7 Mistral Large 3 Mistral $0.50 $1.50 98.0%
8 Gemini 3 Flash Google $0.50 $3.00 96.0%
9 Claude Opus 4.8 Anthropic $5.00 $25.00 67%
10 Gemini 3.1 Pro Google $2.00 $12.00 84%
11 GPT-5 OpenAI $1.25 $10.00 87%
12 Claude Haiku 4.5 Anthropic $1.00 $5.00 93%

Want to calculate your exact savings? Use our Claude 4 Migration Calculator — input your usage and see the cost difference across all alternatives.

When to Use Each Alternative

Stay with Anthropic (Opus 4.8 or Sonnet 4.6)

Switch to DeepSeek (V4 Pro or V4 Flash)

Switch to Google (Gemini 3.1 Pro or Gemini 3 Flash)

Switch to OpenAI (GPT-5 or GPT-5 mini)

Frequently Asked Questions

Do I need a new API key?
If staying with Anthropic (Opus 4.8 or Sonnet 4.6): no. Your existing key works. Just change the model name. If switching to DeepSeek, OpenAI, or Google: yes, you'll need a new key from that provider.

Will my existing code work?
Yes. The Anthropic SDK, API endpoint, and authentication all stay the same. Only the model name string changes.

Is there a grace period?
No. Claude 4 Opus and Sonnet 4 returned HTTP 410 errors starting June 15, 2026. There is no grace period or extension.

What about Claude Haiku 4.5?
Claude Haiku 4.5 was NOT deprecated. It remains available at $1/$5 per 1M tokens. If you were using Haiku, nothing changes.

Can I still use Claude 4 for anything?
No. The model IDs "claude-4-opus" and "claude-4-sonnet" are permanently retired. All API calls return HTTP 410 Gone.

Track Claude 4 Pricing Changes Over Time

APIpulse Pro tracks pricing history across all providers. Get alerts when prices change, compare historical trends, and optimize your costs. One-time purchase: $29.

Get Pro — $29