原题:Per-model token breakdown in the AI usage REST API
GitHub 12 月 2 日称,企业、组织、个人三级的 AI 积分用量 REST API 现在返回按模型拆分的 token 数:输入、输出、图像输入、图像输出、缓存读取、缓存写入共 6 项原始计数,不含价格和折扣。字段定义与 AI 用量报表一致,并遵守原有的时间、用户、模型筛选。Copilot Business 和 Enterprise 的管理员、Copilot 个人版用户都能看到;token 数一般从 2026 年 12 月 1 日的用量开始统计,之前的时段返回 0。
为什么重要 Copilot 用量按 AI 积分结算,管理员现在能直接用 API 看每个模型用了多少 token,不用再下载报表对账。
可信度:高可信 · 来源 GitHub Changelog(含官方) · 事件时间 12-03 02:22(北京时间)
理由
- GitHub 官方更新日志,写明了接口路径和字段
用法
- 调用 GET /enterprises/{enterprise}/settings/billing/ai_credit/usage(组织、用户有对应接口),读取 tokenInput 等字段
风险
- 12 月 1 日之前的用量没有 token 明细,要看旧数据只能下载用量报表