Anthropic: Claude Opus 4.7
Chatanthropic/claude-opus-4.7Opus 4.7 是 Anthropic Opus 系列的新一代模型,面向长期运行的异步代理任务。它延续 Opus 4.6 在编码和代理式执行上的优势,适合大型代码库、多阶段调试和端到端项目编排。
1M context window
128K max output tokens
Released: 2026-04-16
Protocols:OpenAIAnthropic
Capabilities:VisionFunction CallingReasoningPrompt CachingPDF Input
PricingRate 0.15x
| Type | HaoAI Price | Official Reference | Rate |
|---|---|---|---|
| Input | $0.75/M | $5/M | 0.15x · 85% savings |
| Output | $3.75/M | $25/M | 0.15x · 85% savings |
| Cache read | $0.075/M | $0.5/M | 0.15x · 85% savings |
| Cache write | $0.938/M | $6.25/M | 0.15x · 85% savings |
| Cache write 5m | $0.938/M | $6.25/M | 0.15x · 85% savings |
| Cache write 1h | $1.5/M | $10/M | 0.15x · 85% savings |
Code Examples
import anthropic
client = anthropic.Anthropic(
base_url="https://api.hao.ai/anthropic",
api_key="YOUR_HAOAI_API_KEY",
)
message = client.messages.create(
model="anthropic/claude-opus-4.7",
max_tokens=1024,
messages=[
{"role": "user", "content": "Hello!"}
],
)
print(message.content[0].text)