It happened. As of June 15, 2026, Claude 4 Opus and Claude 4 Sonnet are permanently shut down. If your app is still calling these models, you're getting 404 errors right now. This guide walks you through the fix — it takes 30 minutes or less.
The 30-Minute Fix
You don't need to rewrite your app. You just need to change one thing: the model ID.
- ☐ Step 1: Search your codebase for
claude-4-opusandclaude-4-sonnet - ☐ Step 2: Replace with
claude-opus-4-8orclaude-sonnet-4-6 - ☐ Step 3: Test with 5-10 API calls
- ☐ Step 4: Deploy
- ☐ Step 5: Calculate your new costs with APIpulse
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 dead model IDs. Don't forget config files, environment variables, and documentation.
Update Model IDs
The API format is identical — you only change the model name:
// Before (dead — returning 404)
model: "claude-4-opus"
// After (official successor)
model: "claude-opus-4-8"
No other code changes needed. Same API, same SDK, same parameters.
Test and Deploy
Make a few test calls to verify the new model works with your prompts. Then deploy. That's it — your app is back online.
Claude 4 Is Dead — Cost Comparison
Here's what you were paying vs what you'll pay now (per 1M tokens):
Budget Alternatives (save even more)
Calculate Your Exact Savings
Enter your monthly token usage and see exactly how much you'll save by migrating off Claude 4.
Common Error Messages (and What They Mean)
HTTP 404 — Not Found
The model ID claude-4-opus or claude-4-sonnet no longer exists. Replace with claude-opus-4-8 or claude-sonnet-4-6.
"model not found" Error
Same root cause — the model has been removed from Anthropic's API. Update your model ID string.
OpenRouter / Bedrock Errors
If you access Claude 4 through a third party, check their dashboard. Most providers have already removed Claude 4 from their available models list.
LangChain and LlamaIndex Users
Update your model string in the chat instantiation:
# LangChain
chat = ChatAnthropic(model="claude-opus-4-8") # was "claude-4-opus"
# LlamaIndex
llm = Anthropic(model="claude-opus-4-8") # was "claude-4-opus"
Both libraries use the same underlying SDK — only the model ID changes.
Why Claude Opus 4.8?
Claude Opus 4.8 is the official successor to Claude 4 Opus. It offers:
- 67% lower cost — $5/$25 vs $15/$75 per 1M tokens
- Same API format — zero code changes beyond the model ID
- Better performance — improved reasoning, longer context
- No deprecation risk — this is the current flagship model
Fix Your App Now
Use the APIpulse cost calculator to see exactly how much you'll save, then update your model ID. It takes 30 minutes — your app will be back online and cheaper.
Calculate Your Savings →Frequently Asked Questions
Can I still use Claude 4 somehow?
No. All API endpoints for Claude 4 Opus and Claude 4 Sonnet return 404. There is no degraded mode, no grace period, no workaround. The models are permanently retired.
Will my prompts work the same on Claude Opus 4.8?
Yes. Claude Opus 4.8 uses the same API format and responds to the same prompts. You may see slightly different outputs (it's a newer model), but your existing prompts will work without modification.
What if I have fine-tuned Claude 4 models?
Fine-tuned models are also dead. You'll need to re-fine-tune on Claude Opus 4.8 or Claude Sonnet 4.6. Contact Anthropic support for guidance on transferring fine-tuned weights.
Is it worth switching to a cheaper provider like DeepSeek?
It depends on your quality requirements. DeepSeek V4 Pro is 97% cheaper and handles most tasks well, but Claude Opus 4.8 may be better for complex reasoning. Use the APIpulse comparison tool to test both against your use case.
Get Deprecation Alerts
Be notified before any model is deprecated or pricing changes. One email per month, no spam.
Never Get Caught by a Deprecation Again
APIpulse Pro monitors 39 models across 10 providers and alerts you 30 days before any deprecation.