我们已在测试版中推出使用量与成本分析 API,并附带 analytics-usage-cost-2026-08-24 测试版标头。其 /v1/organizations/analytics/usage 和 /v1/organizations/analytics/cost 端点报告 Claude Console 和 Claude Enterprise 组织的 token 使用量与成本。您可以按模型、工作区、API 密钥以及每个请求背后的用户或服务账号等维度筛选和分组结果。使用量与成本 API 现已成为旧版 API,Claude Enterprise Analytics API 的 usage_report、cost_report、user_usage_report 和 user_cost_report 端点也是如此。所有这些仍受支持。要迁移现有集成,请参阅从使用量与成本 API 迁移或从 Claude Enterprise 使用量与成本报告迁移。
We’ve launched the Usage and Cost Analytics API in beta with the analytics-usage-cost-2026-08-24 beta header. Its /v1/organizations/analytics/usage and /v1/organizations/analytics/cost endpoints report token usage and cost for Claude Console and Claude Enterprise organizations. You can filter and group results by dimensions such as model, workspace, API key, and the user or service account behind each request. The Usage and Cost API is now a legacy API, and so are the usage_report, cost_report, user_usage_report, and user_cost_report endpoints of the Claude Enterprise Analytics API. All of them remain supported. To move an existing integration, see Migrate from the Usage and Cost API or Migrate from the Claude Enterprise usage and cost reports.
本文内容采集自官方网站,排版和翻译可能与原页面存在差异。
阅读官方全文