View a markdown version of this page

速率限制和配额 - AWS 上的 Claude 平台

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

速率限制和配额

AWS 上的 Claude 平台会在您订阅时分配第 1 级速率限制。Anthropic 直接管理速率限制,而不是通过 AWS 配额系统进行管理。

默认限制

AWS 上的 Claude Platform 使用 Anthropic 的标准等级计划,与第一方 Claude API 相同。每个工作空间都适用第 1 层限制。限额按模型系列汇总。例如,所有 Opus 型号共享一个组合限制,所有 Sonnet 型号共享另一个限制,所有 Haiku 型号共享三分之一。

有关当前的 1 级值(RPM、ITPM、OTPM)和更高级别的阈值,请参阅 Anthropi c 文档网站上的速率限制。Anthropic 页面是真实信息来源,当限制发生变化时会更新。

速率限制标题

每个响应都包含报告您当前速率限制状态的标题。关键标题:

  • anthropic-ratelimit-requests-limit— 每分钟的最大请求数

  • anthropic-ratelimit-requests-remaining— 当前窗口中剩余的请求

  • anthropic-ratelimit-requests-reset— 请求限制重置的时间 (RFC 3339)

  • anthropic-ratelimit-tokens-limit— 每分钟最大组合代币(输入 + 输出)

  • anthropic-ratelimit-tokens-remaining— 当前窗口中剩余的组合代币

  • anthropic-ratelimit-tokens-reset— 组合代币限额重置的时间 (RFC 3339)

  • anthropic-ratelimit-input-tokens-limit/-remaining/-reset— Input-token-specific 标题

  • anthropic-ratelimit-output-tokens-limit/-remaining/-reset— Output-token-specific 标题

  • retry-after— 在 429 响应中,重试之前要等待的秒数

有关完整内容,请参阅 Anthropic 文档网站上的响应标头

申请更高的限额

与第一方 Claude API 不同,自动升级等级不适用于 AWS 上的 Claude 平台。要申请更高的限制,请联系您的 Anthropic 客户代表,告知您的工作空间 ID 和所需的吞吐量。有关等级阈值和其他详细信息,请参阅 Anthropic 文档网站上的速率限制

速率限制错误

当您超过速率限制时,API 会返回带有rate_limit_error类型的 HTTP 429。在重试逻辑中使用抖动实现指数退避。标retry-after题指示在重试之前要等待多少秒。