If you're reading this because your app broke — you're not alone. Thousands of developers woke up to 410 errors on June 15. The good news: you can fix this in 15 minutes. This guide covers what happened, why it happened, and the fastest path to getting your app back online.
What Happened to Claude 4?
On June 15, 2026, Anthropic officially retired Claude 4 Opus and Claude 4 Sonnet. These models were deprecated weeks in advance, with a clear timeline communicated to developers. Here's the timeline:
- May 2026: Anthropic announced Claude 4 deprecation, recommending migration to Opus 4.8 and Sonnet 4.6
- Early June: Deprecation warnings added to API responses, email notifications sent to all Claude 4 API users
- June 15, 2026: Full shutdown — all Claude 4 API endpoints return 410 Gone
The models aren't coming back. Anthropic has fully transitioned to the 4.x generation (Opus 4.8, Sonnet 4.6) and has no plans to restore access to Claude 4.
Why Is My App Breaking?
If your application was using claude-4-opus or claude-4-sonnet as the model ID, every API call now fails. There's no degraded mode, no fallback, and no partial functionality. It's a hard stop.
Common symptoms:
- HTTP 410 "Gone" errors in your logs
- Chat completions endpoint returning empty responses
- Streaming connections dropping immediately
- Your AI features suddenly stop working for all users
What the error looks like
If you're using the Anthropic SDK, here's the exact error you'll see:
// Python (anthropic SDK)
import anthropic
client = anthropic.Anthropic()
response = client.messages.create(
model="claude-4-opus", # ← This is the problem
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}]
)
# Raises: anthropic.NotFoundError: Error code: 410 -
# {'type': 'error', 'error': {'type': 'not_found_error',
# 'message': 'claude-4-opus has been retired. Please upgrade to
# claude-opus-4-8. See https://docs.anthropic.com/docs/deprecations'}}
// Node.js (@anthropic-ai/sdk)
const response = await client.messages.create({
model: "claude-4-sonnet", // ← Deprecated
max_tokens: 1024,
messages: [{ role: "user", content: "Hello" }]
});
// Error: 410 model_not_found
// "claude-4-sonnet is no longer available. Use claude-sonnet-4-6."
// curl
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-d '{"model":"claude-4-opus","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}'
# HTTP/1.1 410 Gone
# {"type":"error","error":{"type":"not_found_error","message":"claude-4-opus has been retired"}}
The key detail: HTTP 410 Gone (not 404, not 500). The "Gone" status code specifically means the resource was permanently removed and will never return. This is different from a temporary outage.
The 15-Minute Fix
Migrating from Claude 4 is the simplest model migration you'll ever do. The API format, SDK, authentication, and parameters are identical. You change one string:
Find Every Claude 4 Reference
Run this in your project root:
grep -r "claude-4-opus\|claude-4-sonnet" --include="*.js" --include="*.ts" --include="*.py" --include="*.json" .
This finds every file that references the deprecated model IDs. Don't forget config files, environment variables, and documentation.
Update Model IDs
Replace the deprecated model name with the official successor:
// Before (returns 410 Gone)
model: "claude-4-opus"
// After (official successor)
model: "claude-opus-4-8"
// Or for Sonnet:
model: "claude-sonnet-4-6"
No other code changes needed. Same API, same key, same parameters. Your existing API key works as-is.
Test and Deploy
Make 5-10 test calls to verify the new model works with your prompts. Then deploy. That's it — your app is back online.
Calculate your new costs instantly
See exactly what you'll pay with Claude Opus 4.8 vs alternatives. Free calculator — upgrade for alerts.
Claude 4 vs What's Available Now
Here's what you were paying vs what you can pay (per 1M tokens):
Best Claude 4 Alternatives (Ranked by Value)
You have more options than ever after the Claude 4 shutdown. Here are the top alternatives ranked by cost-effectiveness:
Want to see all 67 alternatives with live pricing? Check our Claude 4 Migration Hub — it has 18 head-to-head comparisons, migration calculators, and code snippets for every alternative. Or use our Migration Advisor to find your cheapest option in 60 seconds.
See our ranked comparison of the best Claude 4 replacements →
Key Questions After the Shutdown
Will Anthropic bring back Claude 4?
No. The shutdown is permanent. Anthropic has fully transitioned to the 4.x generation. The model IDs claude-4-opus and claude-4-sonnet will never return. Focus on migrating to Opus 4.8, Sonnet 4.6, or an alternative provider.
Does my API key still work?
Yes, if you're staying with Anthropic. Your existing API key works with Claude Opus 4.8 and Sonnet 4.6 — you just change the model name string. If you're switching to a different provider (DeepSeek, OpenAI, Google), you'll need a new API key from that provider.
What if I already migrated but still see errors?
Double-check that you updated the model ID string everywhere — including config files, environment variables, and any hardcoded strings. Run the grep command above to find any remaining references. Also verify your API key has sufficient credits/quota.
Is there a drop-in replacement with zero code changes?
If you were using claude-4-sonnet, the closest drop-in is claude-sonnet-4-6 — same context window, same output quality, 50% cheaper. For claude-4-opus, use claude-opus-4-8. These are the official Anthropic successors with identical API formats.
Calculate Your New Costs
See exactly what you'll pay after migration. Compare Claude Opus 4.8, Sonnet 4.6, DeepSeek, GPT-5.5, and Gemini — all with real-time pricing.
Open Cost Calculator →Don't just migrate — optimize
Most developers pick the first replacement they find. You get personalized model routing recommendations — use cheap models for 80% of tasks, premium models only when needed. Save up to 40% on your new provider.
No signup required · 100% free
Get Notified When Prices Change
Join 8,300+ developers who get weekly AI pricing updates. Know instantly when providers change prices.
Stop guessing — get exact API cost comparisons
No signup required to 67-model comparison, migration code snippets, PDF reports, price alerts, and cost monitoring. ✅ All tools free.
Free Tools →