Anthropic 在 Messages API 公测消息线程功能
Message threads are now in public beta on the Messages API.
AI 导读
Anthropic 的 Messages API 上线消息线程公测,API 在服务端缓存对话,后续请求只需发送新消息和上一条消息 ID,Claude 能更快开始响应。官方称已在 Claude Code 中集成该功能,500K 至 1M token 的请求首 token 中位时间降低约 35%,长对话的中位请求体积从约 800 KB 降至 1.8 KB。使用时需在请求中加入 thread 参数和 beta header,该功能已在 Claude Platform、AWS 上的 Claude Platform、Microsoft Foundry 中的 Claude 和 Google Cloud 上的 Claude 提供,按标准 token 价格计费。
推荐理由
AI 评分 62
官方给出消息线程在 Claude Code 中的时延与请求体积变化,并说明接入方式与可用平台。
主题
正文 · AI 翻译
Messages API 现已推出消息线程公测版。
该 API 会在服务端缓存各轮次之间的对话,因此你无需重新发送完整对话,只需发送新消息和上一条消息 ID,Claude 就能更快开始响应。https://t.co/VeiehyqfIg