Anthropic: Claude Sonnet 4
anthropic/claude-sonnet-4- 模态
- text+image+file->text
- 输入 / 输出价格
- $3 / $15
- 上下文
- 200K
- 上架
- 2025年5月22日
- 知识截止
- 2025-01-31
每百万
Claude Sonnet 4 significantly enhances the capabilities of its predecessor, Sonnet 3.7, excelling in both coding and reasoning tasks with improved precision and controllability. Achieving state-of-the-art performance on SWE-bench (72.7%),...
视觉工具调用推理长上下文
支持的参数
include_reasoning返回推理
是否在响应里带上推理摘要。
max_tokens输出上限
最多生成多少 token。达到上限会截断。
reasoning推理
打开或配置模型的推理过程。具体字段因模型而异。
stop停止词
生成到这些字符串时停止。可以是字符串或字符串数组。
temperature温度
采样温度。越低越稳定,越高越发散。常见范围 0 到 2。
tool_choice工具选择
控制是否调用工具:auto、none,或指定某个函数。
tools工具
传入函数工具定义,模型可以返回 tool_calls。
top_kTop-K
只从概率最高的 K 个 token 里采样。
top_p核采样
只在累计概率达到 top_p 的 token 里采样。