DEV Community

Cover image for What Is Claude Opus 4.7? Features, Benchmarks, Pricing, and Everything You Need to Know
Preecha
Preecha

Posted on

What Is Claude Opus 4.7? Features, Benchmarks, Pricing, and Everything You Need to Know

TL;DR

Claude Opus 4.7 is Anthropic’s most capable generally available model, released April 16, 2026. It introduces high-resolution vision up to 3.75 megapixels, a new xhigh effort level, task budgets for agentic loops, and a new tokenizer. It keeps the 1M token context window and $5/$25 per million token pricing from Opus 4.6, but includes breaking API changes: extended thinking budgets and non-default sampling parameters are removed.

Try Apidog today

Introduction

Anthropic released Claude Opus 4.7 on April 16, 2026. It replaces Opus 4.6 as the top-tier model in the Claude lineup and targets developers building autonomous agents, knowledge-work assistants, and vision-heavy applications.

The release matters for three practical reasons:

  1. Higher-resolution vision: image input increases from about 1.15 MP to 3.75 MP.
  2. Task budgets: you can give an agentic loop a rough token allowance across thinking, tool calls, tool results, and final output.
  3. Breaking API changes: migrations from Opus 4.6 require request updates.

This guide covers what changed, how to call the API, what to test before migrating, and how to validate your Claude API workflows with Apidog.

Core Specifications

Specification Value
API model ID claude-opus-4-7
Context window 1,000,000 tokens
Max output tokens 128,000 tokens
Input pricing $5 per million tokens
Output pricing $25 per million tokens
Batch input pricing $2.50 per million tokens
Batch output pricing $12.50 per million tokens
Cache read pricing $0.50 per million tokens
5-min cache write $6.25 per million tokens
1-hour cache write $10 per million tokens
Release date April 16, 2026
Availability Claude API, Amazon Bedrock, Google Vertex AI, Microsoft Foundry

Opus 4.7 uses a new tokenizer that may produce up to 35% more tokens for the same text compared to Opus 4.6. The per-token price is unchanged, but your effective request cost may increase depending on your prompts and payloads.

Image

What’s New in Claude Opus 4.7

1. High-Resolution Image Support

Previous Claude models capped image input at 1,568 pixels on the long edge, or about 1.15 megapixels. Opus 4.7 raises that to 2,576 pixels on the long edge, or about 3.75 megapixels.

This is useful for:

  • UI screenshots
  • Design mockups
  • Scanned documents
  • Charts and figures
  • Photos with small visual details
  • Computer-use workflows that depend on precise coordinates

The biggest implementation change is coordinate mapping. Opus 4.7 supports 1:1 mapping with actual pixels, which removes the scale-factor math that previous computer-use workflows often required.

Opus 4.7 also improves:

  • Low-level perception tasks such as pointing, measuring, and counting
  • Image localization and bounding-box-style reasoning
  • Natural-image localization

Higher-resolution images consume more tokens. If your workflow does not require the extra fidelity, downsample images before sending them.

Example preprocessing rule:

function shouldDownsampleImage(width: number, height: number) {
  const megapixels = (width * height) / 1_000_000;

  // Opus 4.7 supports up to ~3.75 MP.
  // Downsample if your use case does not need full fidelity.
  return megapixels > 1.15;
}
Enter fullscreen mode Exit fullscreen mode

2. New xhigh Effort Level

The effort parameter controls how much reasoning Claude invests in a response. Opus 4.7 adds xhigh above the existing high, medium, and low levels.

Use xhigh when quality matters more than latency, especially for:

  • Coding agents
  • Multi-step debugging
  • Tool-heavy workflows
  • Long-context reasoning
  • Complex document or chart analysis

Use high as a baseline for intelligence-sensitive work. Use lower effort levels when you need faster or cheaper responses.

3. Task Budgets Beta

Task budgets help control multi-turn agentic loops. Instead of setting a hard limit for a single response, you provide a rough token target for the full task, including:

  • Thinking
  • Tool calls
  • Tool results
  • Follow-up turns
  • Final answer

Claude sees a running countdown and can use that signal to prioritize work, skip low-value steps, and finish gracefully.

Key details:

  • Minimum task budget: 20,000 tokens
  • It is advisory, not a hard cap
  • Claude may overshoot the budget
  • It differs from max_tokens, which is a hard per-request ceiling that the model does not see
  • Requires the beta header: task-budgets-2026-03-13

Use task budgets when you need cost control for agentic workflows. For open-ended tasks where quality matters most, omit the task budget.

Example request shape:

curl https://api.anthropic.com/v1/messages \
  -H "content-type: application/json" \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "anthropic-beta: task-budgets-2026-03-13" \
  -d '{
    "model": "claude-opus-4-7",
    "max_tokens": 4096,
    "messages": [
      {
        "role": "user",
        "content": "Refactor this service and explain the changes."
      }
    ],
    "thinking": {
      "type": "adaptive"
    }
  }'
Enter fullscreen mode Exit fullscreen mode

4. Adaptive Thinking Replaces Extended Thinking Budgets

Extended thinking with fixed budget_tokens is removed.

This no longer works:

{
  "thinking": {
    "type": "enabled",
    "budget_tokens": 32000
  }
}
Enter fullscreen mode Exit fullscreen mode

In Opus 4.7, use adaptive thinking instead:

{
  "thinking": {
    "type": "adaptive"
  }
}
Enter fullscreen mode Exit fullscreen mode

Adaptive thinking is off by default, so enable it explicitly when you want Claude to allocate reasoning tokens dynamically.

By default, thinking content is omitted from responses. If you need summarized reasoning for progress display or debugging, opt in:

{
  "thinking": {
    "type": "adaptive",
    "display": "summarized"
  }
}
Enter fullscreen mode Exit fullscreen mode

5. Improved Memory

Opus 4.7 is better at writing to and reading from file-system-based memory. This helps agents that maintain state across turns or sessions, such as:

  • Coding agents with a notes file
  • Research assistants with a scratchpad
  • Long-running automation workflows
  • Agents that maintain structured project memory

If your agent already uses file-based memory, test whether you can simplify prompts that previously forced the model to update or reread memory.

6. Knowledge Work Improvements

Opus 4.7 improves several document-heavy workflows:

  • Document redlining: better at producing and checking tracked changes in .docx files
  • Slide editing: improved accuracy when generating and validating .pptx layouts
  • Chart analysis: better at using image-processing libraries such as PIL to analyze charts at the pixel level and transcribe data from figures

Image

What Changed from Opus 4.6

Breaking API Changes

These apply to the Messages API. If you use Claude Managed Agents, there are no breaking changes.

Change Before: Opus 4.6 After: Opus 4.7
Extended thinking thinking: {"type": "enabled", "budget_tokens": 32000} Use thinking: {"type": "adaptive"}
Sampling parameters temperature, top_p, and top_k accepted Non-default values return a 400 error
Thinking display Thinking content included by default Omitted by default; opt in with display: "summarized"
Tokenizer Standard tokenizer New tokenizer, up to 35% more tokens for the same text

Migration Example

Before:

{
  "model": "claude-opus-4-6",
  "max_tokens": 4096,
  "temperature": 0.2,
  "thinking": {
    "type": "enabled",
    "budget_tokens": 32000
  },
  "messages": [
    {
      "role": "user",
      "content": "Review this pull request."
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

After:

{
  "model": "claude-opus-4-7",
  "max_tokens": 4096,
  "thinking": {
    "type": "adaptive"
  },
  "messages": [
    {
      "role": "user",
      "content": "Review this pull request."
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

If you stream or display reasoning progress, include summarized thinking:

{
  "model": "claude-opus-4-7",
  "max_tokens": 4096,
  "thinking": {
    "type": "adaptive",
    "display": "summarized"
  },
  "messages": [
    {
      "role": "user",
      "content": "Review this pull request."
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

Behavior Changes

These changes are not API-breaking, but they may affect your prompts and test expectations:

  • More literal instruction following
  • Response length scales more with task complexity
  • Fewer tool calls by default
  • More reasoning before action
  • More direct and opinionated tone
  • Less emoji and less validation-forward phrasing
  • Fewer subagents spawned by default in agentic workflows

If you previously added prompt scaffolding such as “double-check the slide layout” or “give regular status updates,” retest without it. Opus 4.7 may handle these patterns more directly.

Pricing Breakdown

Opus 4.7 keeps the same per-token pricing as Opus 4.6 and 4.5.

Usage type Cost
Standard input $5 / MTok
Standard output $25 / MTok
Batch input $2.50 / MTok
Batch output $12.50 / MTok
Cache read $0.50 / MTok
5-min cache write $6.25 / MTok
1-hour cache write $10 / MTok
Fast mode input Opus 4.6 only: $30 / MTok
US data residency 1.1x multiplier

The cost variable to watch is the tokenizer. Because Opus 4.7 may produce up to 35% more tokens for the same input text, your effective cost per request may increase even if the per-token price is unchanged.

Use the /v1/messages/count_tokens endpoint before migrating production traffic.

Example:

curl https://api.anthropic.com/v1/messages/count_tokens \
  -H "content-type: application/json" \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-opus-4-7",
    "messages": [
      {
        "role": "user",
        "content": "Analyze this repository and identify risky modules."
      }
    ]
  }'
Enter fullscreen mode Exit fullscreen mode

The 1M context window has no long-context premium. A 900K-token request uses the same per-token rate as a 9K-token request.

Where to Use Opus 4.7

Good Fits

Use Opus 4.7 when the workload benefits from the model’s reasoning, vision, or long-context capabilities.

Strong use cases include:

  • Autonomous coding agents
  • Computer-use workflows
  • UI automation based on screenshots
  • Document processing for .docx, .pptx, and charts
  • Long-context retrieval over large codebases, legal documents, or research papers
  • Multi-session agents with file-based memory
  • Tool-using agents where task budgets help control spend

When Opus 4.7 May Be Overkill

Use a smaller model when the task is simple or latency-sensitive.

Consider alternatives for:

  • Simple Q&A
  • Classification
  • Extraction from structured data
  • Low-latency chatbot flows
  • Batch analytics

For these workloads, Haiku 4.5 at $1/$5 per MTok or Sonnet 4.6 at $3/$15 per MTok may be more cost-effective.

How to Test Your Claude Opus 4.7 Integration with Apidog

Changing the model ID from claude-opus-4-6 to claude-opus-4-7 is the easy part. The important migration work is validating that your prompts, tool definitions, token assumptions, and error handling still work after the breaking changes.

Image

You can use Apidog to test the migration end to end.

1. Import or Define the Claude API Endpoints

Import your OpenAPI spec or manually define the Messages API endpoints in Apidog.

Create request templates for:

  • /v1/messages
  • /v1/messages/count_tokens
  • Tool-use test cases
  • Multi-turn conversations

2. Create Migration Test Scenarios

Build test cases that match your production usage.

Include scenarios for:

  • Normal single-turn requests
  • Long-context prompts
  • Image inputs
  • Tool calls
  • Tool result handling
  • Agentic loops
  • Streaming responses if applicable
  • Error cases

3. Compare Opus 4.6 and Opus 4.7

Run the same scenario against both model IDs:

{
  "model": "claude-opus-4-6"
}
Enter fullscreen mode Exit fullscreen mode
{
  "model": "claude-opus-4-7"
}
Enter fullscreen mode Exit fullscreen mode

Compare:

  • Token counts
  • Response structure
  • Tool-call frequency
  • Output quality
  • Latency
  • Cost per request
  • Prompt caching behavior

4. Validate Breaking Changes

Add explicit tests to confirm:

  • thinking: {"type": "adaptive"} works
  • thinking: {"type": "enabled", "budget_tokens": N} fails as expected
  • Removed sampling parameters are not sent
  • display: "summarized" is present when you need visible thinking summaries
  • max_tokens still leaves enough room for the new tokenizer

5. Debug Tool-Use Payloads

For tool-using agents, inspect the full request and response bodies.

Check for:

  • Missing tool_use_id references
  • Malformed tool results
  • Broken message ordering
  • Unexpected tool-call reductions
  • Schema mismatches
  • Token growth across turns

Apidog’s request chaining helps you pass context between turns and validate response schemas across a full multi-turn workflow.

Migration Checklist

If you are upgrading from Opus 4.6, use this checklist:

  • [ ] Update the model ID to claude-opus-4-7
  • [ ] Replace thinking: {"type": "enabled", "budget_tokens": N} with thinking: {"type": "adaptive"}
  • [ ] Remove temperature, top_p, and top_k, or ensure they are set to defaults
  • [ ] Add display: "summarized" if you need visible thinking summaries
  • [ ] Increase max_tokens headroom for the new tokenizer
  • [ ] Measure token counts with /v1/messages/count_tokens
  • [ ] Retest prompt caching because token counts will differ
  • [ ] Retest image workflows with high-resolution inputs
  • [ ] Test agent loops with and without task budgets
  • [ ] Remove unnecessary prompt scaffolding and compare results
  • [ ] Run end-to-end API tests in Apidog

Conclusion

Claude Opus 4.7 is Anthropic’s strongest generally available model. Its high-resolution vision, task budgets, and xhigh effort level make it especially relevant for autonomous agents, computer-use workflows, and complex knowledge-work automation.

The migration requires code changes: remove fixed extended thinking budgets, stop sending non-default sampling parameters, and account for the new tokenizer. The per-token price is unchanged, but token counts may increase, so measure your real prompts before shifting production traffic.

For API teams, the safest path is to build a migration test suite, compare Opus 4.6 and Opus 4.7 side by side, and validate tool-use flows before rollout.

Top comments (0)