Developer Tools & APIs

Claude Sonnet 4 and Opus 4 are gone from the API — here's what to do

As of June 15, 2026, claude-sonnet-4-20250514 and claude-opus-4-20250514 return errors. Migrate to Sonnet 4.6 and Opus 4.8.

developer tools apis category

Update, 29 June 2026: Anthropic deprecates fast mode for Claude Opus 4.7 — removal July 24, 2026

The same hard-removal pattern that affected claude-sonnet-4-20250514 and claude-opus-4-20250514 is now hitting fast mode on Claude Opus 4.7. Anthropic has deprecated speed: "fast" on claude-opus-4-7, with removal on July 24, 2026. After that date, requests including speed: "fast" on Opus 4.7 will return an error with no silent fallback, leaving you approximately 25 days from today to migrate.

The migration path is fast mode on Claude Opus 4.8. Set speed: "fast" with the fast-mode-2026-02-01 beta header and update your model string to claude-opus-4-8. Migrating is also meaningfully cheaper: fast mode pricing on Opus 4.8 is $10/$50 per MTok input/output, compared to $30/$150 on Opus 4.7.

One behavioral difference worth noting: this is stricter than the Opus 4.6 fast mode deprecation, where requests fell back to standard speed rather than erroring. Opus 4.7 fast mode will hard-error after removal.

Fast mode remains available only through the direct Anthropic API and is not supported on Amazon Bedrock, Google Cloud, or Microsoft Foundry. See the official fast mode documentation and platform release notes for full details.

As of June 15, 2026, claude-sonnet-4-20250514 and claude-opus-4-20250514 are fully retired from the Anthropic Claude API. There is no grace period, no automatic fallback, and no soft landing. If your code still references either of those model ID strings, every request is returning an error right now.

Here is what you need to know, and what to do about it.

What exactly changed

Anthropic announced the deprecation on April 14, 2026, giving developers 60 days notice, which is the minimum they commit to for publicly released models. The retirement took effect at 9AM PT on June 15, 2026.

The two affected model IDs are:

  • claude-sonnet-4-20250514
  • claude-opus-4-20250514

Both were introduced on May 14, 2025, as part of the original Claude 4 launch. For roughly a year they served as the default API choice for production workloads, and they were notable at the time for combining extended thinking and multi-tool use in a single model generation. They had a good run.

The replacements Anthropic recommends are:

  • Claude Sonnet 4 → Claude Sonnet 4.6
  • Claude Opus 4 → Claude Opus 4.8

Both successors are more capable across benchmarks and, in several cases, cheaper per token. There is no performance regression to worry about here.

What happens if you do nothing

Nothing subtle. The API returns an error on every call that references the old model IDs. There is no automatic aliasing to a newer model, no silent rerouting, no warning response. The request simply fails.

If you have production systems, scheduled jobs, background pipelines, or any automation that calls Anthropic with those model strings hardcoded, they are broken until you update them.

How to find your exposure fast

The quickest way to audit your codebase is a global search for the string 20250514. Both deprecated model IDs contain that date suffix, so one grep covers both.

For API-level audit, Anthropic’s usage console lets you download a CSV of your API calls broken down by API key and model. That will show you which keys have been hitting the deprecated models, which is useful if you have multiple services or teams sharing an account.

The migration itself

In most cases this is a one-line change. Find the model ID string, update it to the replacement, run your tests, and ship. The successors share the same API interface, so there are no parameter changes required for a basic migration.

If you are using the Claude Agent SDK with agents explicitly configured to one of the deprecated model IDs, those configurations need the same update. The Agent SDK does not automatically alias deprecated model strings to their successors.

It is also worth noting that Claude Sonnet 4.6 and the broader Opus 4.x family now support a 1 million token context window at standard pricing with no long-context surcharge. If your application benefits from large context, that is a free upgrade you get just by migrating.

A note on scope

This retirement applies to the Anthropic-operated Claude API, Claude Platform on AWS, and Microsoft Foundry. If you are using these models through Amazon Bedrock or Vertex AI, those platforms set their own retirement schedules independently, so check with the relevant platform documentation for their timelines.

Consumer Claude.ai accounts and Claude Code managed environments are not affected. Anthropic handles model selection automatically in those products, so end users and Claude Code subscribers do not need to do anything.

One other thing that changed on June 15

If you use the Claude Agent SDK, there was a second breaking change on the same date: the SDK stopped drawing from your Pro, Max, Team, or Enterprise plan quota and switched to a separate monthly credit allocation. That is a separate issue from the model deprecation, but if you noticed unexpected billing behaviour on June 15 alongside broken API calls, both changes landed simultaneously.

What this means for you

If you are a developer or engineering team with any integration against the Anthropic API, check your code and your usage logs today. The fix is genuinely straightforward, but every hour you wait is another hour of failed requests in production.

If you are not directly maintaining Claude integrations, this is a useful reminder that pinned model version strings in AI applications need periodic review, the same way you would review pinned library versions. Anthropic follows a predictable four-stage lifecycle (Active, Legacy, Deprecated, Retired) and always gives at least 60 days notice, so the deprecation warnings are there if you have a process to catch them.

The full model deprecations page on Anthropic’s documentation site is the canonical place to track what is active, what is deprecated, and what is coming next. Worth bookmarking if you are not already watching it.