←新闻详情

Claude Devs更新于 11月3日 03:21

Anthropic 在 Messages API 公测消息线程功能

To use it, add the thread parameter and beta header to your requests. It's available on the Claude Platform, Claude Platform on AWS, Claude in Microsoft Foundry

AI 导读

Anthropic 在 Messages API 上公测消息线程功能,API 会在服务端缓存对话,开发者只需发送新消息和上一条消息 ID,无需重发完整对话。该功能已在 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 评分 66

官方给出消息线程在 Messages API 公测的接入方式,并披露 Claude Code 中首 token 延迟与请求体积的实测变化。

主题

标签

正文

To use it, add the thread parameter and beta header to your requests. It's available on the Claude Platform, Claude Platform on AWS, Claude in Microsoft Foundry, and Claude on Google Cloud at standard token rates.

Full blog: https://t.co/x4NKvBLcSg

来源

Claude Devs