All insights

Coding agents

Claude Code Opus 4.6: How to Select It, What It Costs, and When to Upgrade

Yes, Opus 4.6 is selectable in Claude Code if it’s available to your account. See the selection commands, Anthropic API setup and pricing, and how to evaluate it against the current Opus model.

Illustration for Claude code opus 4.6

As of November 9, 2026, you can select Claude Opus 4.6 in Claude Code using /model or the model ID claude-opus-4-6, provided it is available to your account. For the Anthropic API, the model ID is also claude-opus-4-6; Anthropic lists it as a legacy model, with Opus 5.5 now the current Opus model. Choose 4.6 when you specifically need it or have validated it on your workload; for a new deployment, compare it with 5.5, which Anthropic lists at lower token rates. (Claude Code model configuration)

Use Opus 4.6 in Claude Code

Start Claude Code, then either:

  • Enter /model and choose Opus 4.6 from the models available to your account. Check the active model with /status.
  • For a terminal session, run claude --model claude-opus-4-6.

The Claude Help Center lists Opus 4.6 as a supported model and documents both selection methods. The interactive /model menu is the practical check for account and organization availability; Claude Code’s default can vary with sign-in method and organization settings. The short alias opus means the latest Opus model on Anthropic’s API, not necessarily Opus 4.6—use the full ID when you need this specific version. (Claude Code model configuration)

Claude Code access and API billing are separate routes. Claude Code is available with Pro, Max and Ultra subscriptions, and with eligible Team or Enterprise access. If you sign in using an API key, Claude Code usage is billed per token to that API account. The Help Center also warns that an ANTHROPIC_API_KEY environment variable can cause Claude Code to use API billing rather than the included subscription usage. (Claude Code plan access)

Is Opus 4.6 a good coding-model choice?

Anthropic describes Opus 4.6 as an improvement for coding, including longer-running agentic work, larger codebases, code review and debugging. Its model reference lists a 1-million-token context window and 128,000-token maximum output. These specifications describe capacity, not a guarantee that every coding task needs or benefits from a large context. (Anthropic’s Opus 4.6 announcement)

A practical selection rule is to try Opus for difficult debugging, architectural decisions or cross-cutting refactors, and use a less costly model for routine work if it meets your quality needs. Anthropic’s Claude Code guidance similarly recommends Opus for harder reasoning and Sonnet for much routine coding. Treat this as a starting point, then compare models on representative tasks from your own repository; competitor benchmark percentages surfaced in search are not a substitute for a reproducible evaluation of your workload. (Claude Code model guidance)

For new work, include Opus 5.5 in that evaluation: Anthropic identifies it as the current Opus model and recommends it for most workloads. Its listed API price is $4 per million input tokens and $20 per million output tokens, versus Opus 4.6 at $5 and $25. Opus 4.6 remains listed as active but legacy, with retirement not sooner than February 5, 2027; that wording is an earliest horizon, not a promise that the model will remain available until that date. (Anthropic models overview; Opus 4.6 model reference)

Call Opus 4.6 through Anthropic’s API

The Anthropic API uses POST https://api.anthropic.com/v1/messages for Messages requests. To run the Python example below, install the SDK and set an API key from your Claude Console account:

pip install anthropic
export ANTHROPIC_API_KEY="your-api-key"

The default Python client reads ANTHROPIC_API_KEY from the environment. The SDK supplies the request authentication headers; if you make HTTP requests directly, Anthropic documents sending the API key as a bearer token in the Authorization header. Keep the key out of source control. (Anthropic API overview; Python SDK setup; Authentication)

This minimal SDK example uses the documented Messages request pattern. The response contains content blocks; print the text blocks to retrieve the textual response:

import anthropic

client = anthropic.Anthropic()
message = client.messages.create(
    model="claude-opus-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Review this function for bugs."}],
)

for block in message.content:
    if block.type == "text":
        print(block.text)

Here, max_tokens=1024 is the cap for this request—not the model’s full output limit. Anthropic’s model reference lists Opus 4.6’s maximum output as 128K tokens. (Messages API reference; Opus 4.6 model reference)

Opus 4.6 API pricing and a simple estimate

Anthropic lists these API rates in USD per million tokens (MTok):

Charge Opus 4.6
Input tokens $5 / MTok
Output tokens $25 / MTok
Prompt-cache reads $0.50 / MTok
5-minute cache writes $6.25 / MTok
1-hour cache writes $10 / MTok
Batch API 50% discount on input and output

The cache-write rates apply to the listed 5-minute and 1-hour cache durations. Batch pricing is for requests made through the Message Batches API. (Anthropic pricing; Opus 4.6 model reference)

For a billing illustration, assume one uncached request uses 100,000 input tokens and generates 10,000 output tokens. At the standard rates, that is $0.50 + $0.25 = $0.75. This is an arithmetic example, not a tested request; actual charges depend on token use and whether caching or Batch API pricing applies. Anthropic defines the context window to include the response itself, so input and generated output both use context capacity. (Opus 4.6 model reference; Context windows)

Claude Code subscription access is not the same as this per-token API calculation.

Bottom line

  • Already using Opus 4.6 in Claude Code? Select it by name, check /status, and benchmark a newer model before migrating production work.
  • Starting a new API integration? Test claude-opus-4-6 against claude-opus-5-5 using representative tasks, output quality and actual token spend. Anthropic recommends considering migration from the legacy model. (Claude Code model configuration)
  • Choosing between subscription access and API use? Check which account Claude Code is using and how it meters usage before estimating cost; a configured API key can switch the billing route. (Claude Code usage and limits)

Sources

Claude Code model configuration

Models, usage, and limits in Claude Code

Use Claude Code with your Pro, Max, or Ultra plan

Claude Opus 4.6 model reference

Models overview

API overview

Messages API reference

Python SDK

Authentication

Pricing

Context windows

Introducing Claude Opus 4.6

Contact us