Claude Opus 4.7 API pricing: previous flagship at 87.6% SWE-bench

Opus 4.7 and Opus 4.8 share the listed $5/1M input and $25/1M output rates. Anthropic reports an 87.6% SWE-bench score for 4.7 and 88.6% for 4.8; the one-point benchmark difference does not establish a production-quality difference.

By benchr Editorial Team · · Pricing and benchmark provenance rechecked against official sources, July 24, 2026 · View changelog

Input / 1MAnthropic
Output / 1MAnthropic
SWE-benchAnthropic-reported
Contextmax window

Pricing breakdown

claude-opus-4-7 — official Anthropic pricing
TierRate / 1M tokens
Standard input$5.00
Standard output$25.00
Cached input$0.50
Context window1,000,000 tokens
Max output32,000 tokens

Opus 4.7 vs Opus 4.8: the 1-point question

Anthropic reports SWE-bench Verified at 87.6% for Opus 4.7 and 88.6% for Opus 4.8. A one-point benchmark delta does not mean one additional production issue resolved per 100 tasks, because repository mix, prompts, tools, scaffolding, and pass criteria differ.

For an existing 4.7 deployment, compare migration effort with a measured change in task success, review time, latency, and regressions. For a new project, 4.8 is a candidate because its listed token rate is the same, but it still requires workload testing.

Opus vs Sonnet: the real cost decision

Claude Sonnet 4.6 is listed at $3/1M input and $15/1M output — 40% below Opus on both rates. Anthropic reports 79.6% on SWE-bench for Sonnet and 87.6% for Opus 4.7. That eight-point provider benchmark gap does not establish which tier is more economical for refactoring, architecture review, chat, summarization, or classification.

Run a blind evaluation on the same tasks. If Opus does not produce a measurable improvement in accepted outputs or review cost, Sonnet remains the lower-priced candidate.

Caching and the effective rate

Cached input for Claude Opus 4.7 costs $0.50/1M — 90% off standard. For agents with a large fixed system prompt (say 80K tokens of tool definitions and instructions), a 90% cache hit rate brings the effective input cost to roughly $0.95 per million tokens — comparable to uncached Sonnet 4.6 at $3 per million. Output doesn't cache, so output-heavy workloads still pay the full Opus premium on the output side.

Cost scenarios

At medium volume — 5M input tokens and 1.5M output per month — Opus 4.7 costs $25 + $37.50 = $62.50/month. Sonnet 4.6 at the same volume: $15 + $22.50 = $37.50/month. The Opus premium is $25/month at this scale. At 90% cache hit on input: approximately $4.75 + $37.50 = $42.25/month. That puts cached Opus within 13% of uncached Sonnet for systems with stable, reusable context.

Use-case fit

Candidate for: Existing deployments already pinned to 4.7 and workloads such as multi-file coding, architecture review, long-document analysis, or agent loops where a matched evaluation supports the tier.

Compare alternatives if: You are starting a new project or Sonnet passes the same acceptance tests. Include Opus 4.8 because its listed token rates match 4.7.

Decision checklist

Run your task sample on both Claude Sonnet 4.6 and Claude Opus 4.7 in a blind evaluation before committing to Opus pricing. If you cannot detect a useful difference, Sonnet is the lower-priced candidate.

For Opus 4.7 versus 4.8, do not convert the one-point SWE-bench delta into an assumed one-point production gain. Use versioned regression cases and your own pass criteria.

Frequently asked

What is the difference between Claude Opus 4.7 and Opus 4.8?

Anthropic reports 88.6% SWE-bench for Opus 4.8 and 87.6% for 4.7, while both list $5/1M input and $25/1M output. The benchmark delta does not predict your production gain. Compare both versions on the same regression set before migrating.

When should I use Claude Opus 4.7 instead of Sonnet 4.6?

Use 4.7 when a matched evaluation shows that its measured task success or lower review burden justifies the higher rate. Anthropic reports an eight-point SWE-bench difference, while Sonnet's listed input and output rates are 40% lower; neither fact alone selects a tier for your workload.

Does Claude Opus 4.7 support prompt caching?

Yes. Cached input costs $0.50/1M — 90% off the $5 standard rate. At 90% cache hit on a large system prompt, the effective input cost drops to approximately $0.95 per million, making Opus competitive with uncached Sonnet 4.6 pricing for cache-friendly workloads.

Changelog

  • — Labeled benchmark figures as provider-reported and replaced universal tier, quality, migration, and ROI claims with matched-workload evaluation guidance.
  • — Expanded with Opus 4.7 vs 4.8 analysis, Sonnet comparison, caching economics, and cost scenarios.
  • — Published. Pricing verified at anthropic.com/pricing.

Sources