claude-opus-4-7
Capability: 200K context · tool use · vision · prompt caching · streaming · extended thinking
Pricing: per-token, Opus tier (live rate)
Opus 4.7 is the prior-generation Opus, now superseded by Claude Opus 4.8 as the flagship. It is still the model you reach for when the one shot has to be right.
It’s slower than Sonnet, more expensive than Sonnet, and noticeably
better at the things Sonnet starts cutting corners on: long-context
reasoning, multi-step plans where each step depends on the last, and
the kind of code generation where the first draft has to compile and
match the architecture conventions of an existing codebase. With
extended thinking enabled, the response wait grows but the answer
quality on hard problems jumps further than the latency cost suggests.
Request
Body parameters
Response
thinking_tokens are billed at the input-token rate (extended thinking
adds latency but not the full output cost). See the
pricing table for current rate.
Code examples
Extended thinking
Opt in by setting thethinking block:
budget_tokens is the maximum number of internal-reasoning tokens. The
model may use fewer; the floor is a few hundred. Recommended budgets:
Higher budgets monotonically improve answer quality on hard problems —
but the marginal return falls off above 16K for most tasks.
Cache control
Errors
When to use
- One-shot quality matters and you can wait for a thoughtful answer.
- Code generation in an existing codebase where conventions matter.
- Multi-step plans where each step depends on the last (Sonnet starts skipping; Opus 4.7 keeps the chain tight).
- Long-context reasoning across legal / medical / technical corpora within the 200K window.
- For mid-tier cost / latency, see Sonnet 4.6.
- For high-throughput agent loops, see Haiku 4.5.