Anthropic: Claude Opus 4.8
Chatanthropic/claude-opus-4.8Claude Opus 4.8 是 Anthropic Opus 系列中当前通用可用的高能力模型,支持文本、图像和文件输入以及文本输出,具备推理能力和 1M 上下文窗口,适合高自主代理、长期任务、知识工作和需要长期记忆一致性的工作流。
1M context window
128K max output tokens
Released: 2026-05-28
Capabilities:VisionFunction CallingReasoningPrompt CachingPDF Input
About
Claude Opus 4.8 is Anthropic's most capable generally available model in the Opus family. It supports text, image, and file inputs with text output, with reasoning support and a 1M-token context window. It is suited for highly autonomous agents, long-horizon agentic work, knowledge work, and memory-driven tasks where coherence over extended sessions matters. It is particularly strong on multi-step reasoning, complex coding, and end-to-end project orchestration - large codebases, multi-stage debugging, and long-running asynchronous agent pipelines. Beyond coding, it handles knowledge work such as drafting documents, building presentations, and analyzing data, maintaining quality across very long outputs.
Pricing1.5折
| Type | HaoAI Price | Official Reference | Rate |
|---|---|---|---|
| 输入 Token | $0.75/M | $5/M | 0.15x · 节省 85% |
| 输出 Token | $3.75/M | $25/M | 0.15x · 节省 85% |
| 缓存读取 | $0.075/M | $0.5/M | 0.15x · 节省 85% |
| 缓存写入 | $0.938/M | $6.25/M | 0.15x · 节省 85% |
| 缓存写入 5 分钟 | $0.938/M | $6.25/M | 0.15x · 节省 85% |
| 缓存写入 1 小时 | $1.5/M | $10/M | 0.15x · 节省 85% |
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.8",
max_tokens=1024,
messages=[
{"role": "user", "content": "Hello!"}
],
)
print(message.content[0].text)