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

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.


Updates to this story

31 July 2026: Anthropic retires experimental prompt-tools APIs and Workbench on August 17

Anthropic has confirmed that three experimental prompt-generation endpoints and the legacy Workbench will stop working on August 17, 2026 — 16 days from now. This is the same hard-error pattern as the June 15 model retirements: no graceful degradation, just failures.

The three endpoints being retired are /v1/experimental/generate_prompt, /v1/experimental/improve_prompt, and /v1/experimental/templatize_prompt. Any code still calling these paths will return errors after August 17. Audit your codebase now if there is any chance your tooling relied on them.

The legacy Workbench is also being retired on the same date. A refreshed Workbench is replacing it, but it is a deliberate step back in scope: it is stateless, stores nothing on Anthropic’s servers, and does not support saved prompts, prompt history, evals, or prompt sharing. If you have data in the legacy Workbench, export it immediately from the banner or under your Organizational Settings — those exports will not be available after August 17.

The new Workbench is built directly on the public Messages API, so requests and responses match exactly what your code sees.

If you already migrated your model IDs following the June 15 changes, your next step is checking whether any of your tooling also touched these experimental endpoints. Details are in the Anthropic platform release notes.

19 July 2026: Claude API deprecates fast mode for Opus 4.7 with July 24 removal deadline

Anthropic has deprecated fast mode for claude-opus-4-7, with hard removal on July 24, 2026. This extends the migration pressure covered in the original post: if you moved to Opus 4.7 and are using speed: "fast", you have until July 24 to move again.

After removal, any request to claude-opus-4-7 with speed: "fast" will return an error. Unlike Opus 4.6, there is no silent fallback to standard speed. This is a hard failure.

The migration target is fast mode on claude-opus-4-8. The fix is a one-line model ID change. Search your codebase for claude-opus-4-7 alongside speed or fast, and update the model string before the deadline. If you are not using fast mode, claude-opus-4-7 itself is not being retired and nothing changes for you.

Migrating also brings a significant price drop: Opus 4.8 fast mode costs $10/$50 per million input/output tokens, compared to $30/$150 on Opus 4.7. Capabilities and fast mode behavior are unchanged.

To invoke fast mode on Opus 4.8, set speed: "fast" and include the fast-mode-2026-02-01 beta header. Note that fast mode on Opus 4.8 is available on the Claude API only, not on Amazon Bedrock, Google Cloud, or Microsoft Foundry. See the fast mode documentation for full details.

11 July 2026: Claude Opus 4.7 fast mode deprecated with July 24 hard removal

Anthropic announced on June 25, 2026 that fast mode for claude-opus-4-7 is deprecated, with a hard removal date of July 24, 2026. After that date, any request to claude-opus-4-7 with speed: "fast" will return an error. There is no graceful fallback: the model does not silently drop to standard speed the way Opus 4.6 does. The migration target is fast mode on claude-opus-4-8.

This is a narrower enforcement than the full model retirements covered in the original post, but the consequence for unprepared pipelines is the same: hard errors with no warning at request time.

A few things worth knowing before July 24:

  • Fast mode on Opus 4.8 is priced at $10/$50 per million input/output tokens, compared to $30/$150 on Opus 4.7. (Fast mode docs)
  • Fast mode is available on the Claude API only. It is not available on Amazon Bedrock, Google Cloud, or Microsoft Foundry.
  • Claude Code users on versions earlier than v2.1.154 should update before July 24. Versions v2.1.142 through v2.1.153 default fast mode to Opus 4.7.

Audit any pipeline sending speed: "fast" to claude-opus-4-7, swap the model string to claude-opus-4-8, and keep the fast-mode-2026-02-01 beta header in place.

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.