Claude Opus 4.5 Retirement on Jan 22, 2027: Migrate to Opus 5.5 Without 400 Errors

Anthropic announced that Claude Opus 4.5 will retire on January 22, 2027. Both dated and undated model IDs are affected. Find remaining deployments, distinguish Anthropic-managed platforms from partner-operated services, and migrate requests to Opus 5.5. Replace manual thinking budgets, remove rejected parameters and beta headers, update structured outputs, and recheck token limits and costs. An Anthropic-compatible pay-as-you-go API provides another integration route.

Contents
Claude Opus 4.5 Retirement on Jan 22, 2027: Migrate to Opus 5.5 Without 400 Errors

If your application still sends claude-opus-4-5-20251101 or claude-opus-4-5, plan to migrate before January 22, 2027. Anthropic announced the retirement on November 23, 2026, and recommends claude-opus-5-5 as the replacement. Changing the model ID alone is insufficient: Opus 5.5 rejects several older request settings with HTTP 400 errors.

This affects developers using the Claude API, teams running custom agents, and applications routing Anthropic Messages requests through gateways. The announced date also covers several Anthropic-managed cloud platforms. Amazon Bedrock and Google-managed Claude deployments have separate schedules.

Choose where to run Opus 5.5

You have three practical routes. Choose based on your existing deployment, account access, and billing requirements.

RouteWhat you needWhen to choose it
Keep the existing deployment temporarilyAn active Opus 4.5 deployment and a migration window before January 22Use this only during the transition. Do not treat the retirement date as a recommended migration date.
Anthropic’s Claude APIA Claude Console account and API key, or a configured Workload Identity Federation ruleChoose this when you want Anthropic’s direct API and billing.
Anthropic-compatible pay-as-you-go gatewayA gateway account, its API key, a compatible Messages client, and an Opus 5.5 model confirmed for the Anthropic endpointChoose this when you need API access without relying on an Anthropic subscription. Verify model availability and current billing before switching.

Call Opus 5.5 through BetterToken

BetterToken provides an Anthropic-compatible Messages API. Its base URL is https://bettertoken.ai, and requests use the x-api-key authentication header.

The structured pricing catalog listed claude-opus-5-5 in its Claude model names on November 25, 2026. However, a model listing alone does not establish support for the Anthropic Messages endpoint. Before using this route, inspect the current catalog entry for claude-opus-5-5 and confirm that its own supported_endpoint_types field includes anthropic. Do not infer model-level compatibility from a separate endpoint-type list.

Once that condition is confirmed, create your own BetterToken account and API Key. Collect the key in Bash without displaying it:

read -rs BETTERTOKEN_API_KEY && export BETTERTOKEN_API_KEY

Send a small request to the documented Messages endpoint:

curl https://www.bettertoken.ai/v1/messages \
  --header "x-api-key: $BETTERTOKEN_API_KEY" \
  --header "anthropic-version: 2023-06-01" \
  --header "content-type: application/json" \
  --data '{
    "model": "claude-opus-5-5",
    "max_tokens": 1024,
    "messages": [
      {
        "role": "user",
        "content": "Explain what this function does."
      }
    ]
  }' \
  --write-out '\nHTTP %{http_code}\n'

The --write-out option prints the HTTP response code after the response body. Check for HTTP 200. Then inspect the request’s status and charge in the BetterToken Dashboard.

For Claude Code, follow the dedicated BetterToken Claude Code setup guide. For a custom agent, use its Anthropic Messages client and configure the documented base URL, key, and model. Do not copy OpenAI-compatible configuration fields into an Anthropic Messages client.

Create a BetterToken account

Anthropic’s direct route requires a Claude Console account and an API key or configured Workload Identity Federation rule. Anthropic provides direct API access with its own billing and support. Follow the official Claude API documentation for authentication and Messages requests. A gateway API key does not provide a Claude.ai subscription or subscription-only features.

Which deployments retire on January 22?

Anthropic’s November 23 announcement identifies two affected model IDs:

  • claude-opus-4-5-20251101
  • claude-opus-4-5

The second is the undated alias for the same model. Both appear in the retirement notice.

For the Claude API, the recommended replacement is claude-opus-5-5, a fixed model ID without a date suffix. Use that ID for direct Claude API requests and compatible gateway requests that expose the same model ID.

The January 22, 2027 date applies to Anthropic-operated platforms:

  • Claude API
  • Claude Platform on AWS
  • Claude Models on Google Cloud (Anthropic managed)
  • Microsoft Foundry

Do not apply that date automatically to every cloud deployment. Amazon Bedrock and Claude Models on Google Cloud (Google managed) are partner-operated platforms. They set their own retirement schedules, so lifecycle dates can differ.

Cloud users must also use the model ID assigned by their platform. Check Anthropic’s Opus 5.5 availability and platform-specific model IDs, as well as the model deprecations overview, before scheduling a production cutover.

Anthropic says it provides customers with active deployments at least 60 days’ notice for publicly released models. After retirement, requests to the retired model fail. Do not rely on automatic substitution by a client, gateway, or agent framework.

The announcement concerns the model lifecycle on the named platforms. It does not establish a separate Claude Code subscription retirement date. Claude Code users should verify the model options supported by their installed client and account rather than assume the API schedule proves a subscription shutdown.

Find every remaining Opus 4.5 reference

Start with runtime usage. A source-code search alone can miss model IDs stored in environment variables, database records, deployment settings, and gateway configuration.

Export usage from Claude Console

Anthropic documents a direct audit procedure:

  1. Open the Usage page in Claude Console.
  2. Click Export.
  3. Review the downloaded CSV.
  4. Filter the results by model and API key.

The export breaks down API usage by API key and model. This helps identify which applications still send requests to deprecated models.

Compare the export with your service inventory. Record the application, owner, environment, request volume, and downstream dependencies for each deployment.

Include scheduled jobs and low-frequency agents. A workload that runs once a month can still fail after retirement.

Search repositories and configuration

Search tracked files for both IDs and common model aliases. Run this command in Bash from the repository root:

git grep -n -E 'claude-opus-4-5-20251101|claude-opus-4-5'

Then search files that Git does not track, such as local deployment manifests and generated configuration:

grep -RInE 'claude-opus-4-5-20251101|claude-opus-4-5' \
  --exclude-dir=.git \
  --exclude-dir=node_modules \
  .

Review these locations separately:

  • Claude Code model settings and project configuration.
  • Agent framework defaults and fallback model lists.
  • Gateway routing rules and provider mappings.
  • CI/CD variables and deployment configuration.
  • Database-backed model preferences and tenant settings.
  • Infrastructure templates, scheduled jobs, and container environment variables.

Search results are leads, not proof of active usage. A retired ID can remain in documentation or test fixtures. Conversely, a model can be selected dynamically and never appear as a literal in the repository.

Create an inventory with one row per runtime deployment. Mark each row as migrated, scheduled, inactive, or awaiting verification.

Migrate the request from Opus 4.5 to Opus 5.5

The official Opus 5.5 migration guide defines the required request changes. Apply them to your agent’s request builder, not only to the model selector.

For a direct migration from Opus 4.5, follow the guide from its first section through the Opus 4.5 checklist. Some breaking changes took effect in Opus 4.6 and others in Opus 4.7. They all apply when moving directly to Opus 5.5.

1. Replace manual thinking budgets with adaptive thinking

Opus 5.5 always uses adaptive thinking. You can omit the thinking field or explicitly set its type to adaptive.

Remove the old manual budget configuration:

{
  "thinking": {
    "type": "enabled",
    "budget_tokens": 8192
  }
}

Use adaptive thinking and configure the effort level inside output_config:

{
  "thinking": {
    "type": "adaptive"
  },
  "output_config": {
    "effort": "medium"
  }
}

You can also omit thinking entirely. Both approaches use adaptive thinking.

Do not send thinking: {"type": "disabled"} or thinking: {"type": "enabled", "budget_tokens": N}. Opus 5.5 rejects both forms with HTTP 400.

The old budget_tokens setting is no longer the way to control reasoning depth. Use output_config.effort instead.

Opus 5.5 supports five effort levels:

  • low
  • medium
  • high
  • xhigh
  • max

The default is medium. Set it explicitly so your application does not rely on an implicit default.

Do not translate an old budget_tokens number directly into an effort level. Run an effort sweep against your own evaluations. Measure quality, latency, and token usage at each level.

2. Remove assistant-message prefills

Older integrations sometimes end the message list with a partial assistant response. Opus 5.5 rejects a prefilled assistant turn.

For example, remove a trailing message such as:

{
  "role": "assistant",
  "content": "The answer is"
}

Move the instruction into the system prompt or use structured outputs when you need a constrained response shape. Do not replace the prefill with another incomplete assistant message.

3. Remove sampling parameters

Omit these fields from Opus 5.5 requests:

  • temperature
  • top_p
  • top_k

Use prompt instructions to guide the response.

If your shared request builder serves multiple model families, make these fields conditional. Do not remove them globally if another provider still requires them.

Anthropic’s model deprecations reference also documents these sampling parameters as removed in API version 2026-10-21, returning HTTP 400 when supplied. Check the API version used by your application.

4. Stop forcing tool calls through tool_choice

Opus 5.5 rejects forced tool selection using any or tool.

Use automatic selection:

{
  "tool_choice": {
    "type": "auto"
  }
}

You can also set {"type": "none"} when the request must not invoke tools.

If your agent previously forced a particular tool, move the constraint into your tool definitions, application logic, or structured-output validation. Then let the model choose tools through automatic selection.

Update the agent loop to handle a response containing text rather than the expected tool call.

5. Remove obsolete beta headers

The Opus 4.5 migration guide identifies three beta headers to remove:

HeaderMigration
effort-2025-11-24Remove it. Effort configuration no longer requires a beta header.
fine-grained-tool-streaming-2025-05-14Remove it from the request.
interleaved-thinking-2025-05-14Remove it. Adaptive thinking enables interleaved thinking automatically.

These are migration recommendations. Do not interpret the three header removals as evidence that sending those headers independently causes HTTP 400 errors.

Do not remove unrelated beta headers without checking their own feature requirements. Computer-use headers have a separate migration described below.

The migration also moves from the beta Messages SDK namespace to the stable namespace. For example, Python clients should call client.messages.create() rather than client.beta.messages.create(). Apply the corresponding stable method for your SDK language.

6. Move structured output to output_config.format

If your application uses structured outputs, migrate the request field from output_format to output_config.format.

The new field belongs inside the same output_config object used for effort. Preserve the format object your application already uses and move it under the new format property:

{
  "output_config": {
    "effort": "medium",
    "format": {
      ... existing format object ...
    }
  }
}

The previous output_format parameter is deprecated and will be removed in the future. Using it without the required structured-outputs-2025-11-13 beta header returns HTTP 400.

There is an SDK-specific distinction. In Python SDK v1.0 and later, passing a schema dictionary through output_format={...} raises a TypeError. Use output_config instead.

Passing a Pydantic model to parse() or stream() remains supported because the SDK sends it as output_config.

7. Check tool-call parsing and computer use

Claude Opus 4.6 and later can produce different JSON string escaping in tool arguments. This can affect custom parsers that process raw strings.

Use a standard JSON parser instead of manually splitting or interpreting tool-call JSON. For example, use json.loads() in Python or JSON.parse() in JavaScript.

If your agent uses the older computer_20251124 tool on the Claude API, migrate it to computer_toolset_20260801. Remove the old anthropic-beta: computer-use-2025-11-24 header and replace the old tool entry with {"type": "computer_toolset_20260801"}. Remove the old tool’s name and display-dimension fields as required by the new toolset. Update your agent loop to handle its tool-use blocks and results.

Amazon Bedrock is an exception: Opus 5.5 also accepts computer_20251124 with the computer-use-2025-11-24 beta header there. Check the official computer-use migration guide before changing a Bedrock integration.

Recalculate output limits and request costs

A migration can succeed technically while changing your application’s token consumption and latency. Opus 5.5 always uses adaptive thinking, and thinking tokens count toward output usage.

This changes two assumptions that older integrations may have encoded:

  1. The visible answer is not the entire output-token budget.
  2. A fixed thinking budget no longer provides a predictable upper bound on reasoning tokens.

The max_tokens parameter covers thinking tokens plus response text. If you previously disabled thinking, revisit your output limit.

Anthropic recommends starting at 64k for xhigh or max effort. Treat this as a starting recommendation, then measure your actual workloads. Do not increase every request to the maximum without checking its needs.

Set limits according to the task and inspect the actual usage returned by the API. Select content blocks by their type, not by assuming that content[0] contains the answer.

For tool-use loops, pass thinking blocks back unmodified when returning tool results. Preserve their original content and order.

Re-baseline cost at the selected effort

The default effort is medium. A migration that leaves effort implicit can therefore produce a different workload from one that explicitly requests high or xhigh.

Thinking tokens are billed as output tokens, even when the thinking text is not returned. Workloads that previously ran without thinking can therefore consume more output tokens per request.

Anthropic documents that Opus 5.5 can use roughly 1 to 1.35 times as many tokens when processing text compared with models before Claude Opus 4.7. The ratio varies by content. Recheck client-side token estimates and context-compaction thresholds.

Run representative tasks against Opus 5.5 before replacing the production route. Include short code edits, multi-file changes, tool-heavy agent loops, and long reasoning tasks if your application handles them.

For each test, record:

  • Input tokens.
  • Output tokens, including thinking usage.
  • Cache-read and cache-creation usage, if applicable.
  • Selected effort level.
  • Request latency.
  • Tool calls and completed task results.

Compare equivalent tasks and billing units. Check the official pricing reference for current input, output, and prompt-cache rates.

For a gateway, verify its current model listing and billing unit before estimating spend. BetterToken publishes current rates through its live pricing catalog. Do not use historical prices as a proxy for the current charge.

A pay-as-you-go API and a monthly subscription are different products. Do not compare a subscription allowance with API token charges as if they represented the same workload.

Verify the migration before production cutover

Run the updated request through staging before replacing the production route. Apply response checks that match the provider and its documented response format.

For a direct Claude API integration, inspect the returned model, content blocks, usage, and stop reason. For BetterToken, check for HTTP 200 and inspect the request status and charge in the Dashboard. Its Messages documentation states that response fields depend on the selected model and request parameters.

If your agent depends on particular response fields, verify those fields against the response documentation for the selected route and model. Test their actual presence and handling before making them production cutover criteria.

For an agent, also test the behaviors it relies on:

  • A normal text answer completes without a 400 error.
  • Adaptive thinking works with the selected effort.
  • A tool-using request parses its returned input correctly.
  • The agent passes thinking blocks back unmodified in tool-use loops.
  • Structured outputs match your existing schema.
  • The agent handles refusal and fallback behavior.
  • Requests stay within the revised max_tokens limit.

Read content blocks by their type when the selected response format documents those blocks. Do not assume every response contains only text.

Also inspect your fallback configuration. If a router moves a conversation away from Opus 5.5, the fallback model may not provide the same thinking blocks. Your application must handle that difference instead of assuming all providers return identical content.

Once staging passes, deploy by workload. Keep a rollback path to another active model, not to the retired Opus 4.5 ID. Monitor request errors, token usage, latency, and tool-call completion after the cutover.

If your next step is to connect the replacement model to a development tool, see the Claude Code Opus 5.5 model-selection guide. It covers model selection and how to keep Opus 5.5 selected.

For a working Messages request and common API errors, use Claude Opus 5.5 API: First Request and 400 Error Fixes. If you are moving several hosted models in a development environment, the GitHub Copilot model deprecation guide covers a separate migration schedule.

Anthropic’s retirement notice gives you a fixed deadline for the named platforms. Find the active deployments now, update the request format as well as the model ID, and verify the replacement under your real agent workload before January 22, 2027.

BetterToken API
Claude, GPT, Gemini, and DeepSeek with one API key
Text & code
ClaudeGPTGeminiDeepSeekGLMKimiQwenMiniMax+4
Video & images
SeedanceKlingWanHailuoGPT ImageNano Banana+2
  • One key for every model
  • Pay as you go, no subscription
  • OpenAI- and Anthropic-compatible