anthropic/claude-sonnet-5
Anthropic 迄今最 agentic 的 Sonnet。能自主规划、调用工具、长程自治,推理/编码/工具调用接近 Opus 4.8,成本却低得多。支持 100 万 token 上下文与原生 prompt cache。大多数 Agent 与生产负载的新首选。
来源: official_x0.5 · 核验于 2026-06-30
缓存读 $0.150/M · 缓存写 $1.88/M
API 调用时用任一 ID 都可以。
anthropic/claude-sonnet-5把 ONEHOP_KEY 占位符替换为你的 API Key。 创建 →
from anthropic import Anthropic
client = Anthropic(
base_url="https://api.onehop.ai/anthropic",
api_key="<ONEHOP_KEY>",
)
message = client.messages.create(
model="anthropic/claude-sonnet-5",
max_tokens=1024,
messages=[{"role": "user", "content": "What is the meaning of life?"}],
)
print(message.content[0].text)最近 30 天 1 次请求