claude-code - 💡(How to fix) Fix [BUG] Admin cost_report API reporting ~100× above token-rate math — $3,147 vs expected $42 for the past 7 days

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Hi — I'm an individual API customer. I saw the issue on the console, and had Claude Code assist in investigation.

Requests are given below.

The admin /v1/organizations/cost_report endpoint reports numbers exactly ~100× higher than what published per-token rates predict. Sampled days over the past week:

day (UTC)cost_report amounttoken × published rate
2026-04-17$845.72$8.44
2026-04-18$1,100.68~$11
2026-04-19$331.57~$3.30

7-day total reported: $3,147. Computed-from-tokens at published Claude Sonnet 4 rates ($3/M input, $15/M output, $0.30/M cache-read) across 9.86M input / 0.75M output / 4.41M cache_read: ~$42.

Every line item in the per-description breakdown is exactly ~100× too high against its own token_type / context_window / service_tier count.

Console balance currently shows $21.40 (auto-reload disabled). Application-side logs, which compute cost locally via the published-rate formula, total $17.55 for the week — matching my expected ~$42 divided by 100× about exactly.

Sample request IDs (several, across days):

  • req_011CaC5oUBw5qhgzauytoiL2
  • req_011CaC67j5sz8rxYnJ53x9oP
  • req_011CaC6QTVVU3X4u7fcLpAS9

Thanks

What Should Happen?

Two possibilities:

  1. The cost_report amount field is returned in a sub-unit of USD (cents / hundredths) despite the "currency": "USD" label → documentation / API bug, my real spend is ~$31 for the week, no refund needed, but please confirm and update the docs.
  2. My account will actually get billed ~$3,100 at ~100× list rate → I'd like a refund and an explanation of the upstream bug.

Either way I need a human to confirm which interpretation applies.

Error Messages/Logs

Steps to Reproduce

Look at the console usage report for an api account, and see scary numbers.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.114 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The cost_report endpoint may be returning amounts in a sub-unit of USD, such as cents, despite being labeled as USD, causing the reported costs to be approximately 100 times higher than expected.

Guidance

  • Verify the unit of the amount field in the cost_report endpoint by checking the API documentation or contacting support to confirm whether it is indeed in USD or a sub-unit like cents.
  • Review the calculation of the expected cost using the published rates to ensure it is correct and takes into account all relevant factors, such as input, output, and cache-read tokens.
  • Compare the reported costs with the computed costs from application-side logs to identify any discrepancies and understand the scale of the issue.
  • Consider reaching out to the API support team to request a refund if the reported costs are incorrect and to obtain an explanation for the upstream bug.

Notes

The issue may be due to a documentation or API bug, and it is essential to confirm the unit of the amount field to determine the correct course of action.

Recommendation

Apply workaround: Verify the unit of the amount field and adjust the expected cost calculation accordingly, as this will help to determine whether a refund is needed and to understand the actual costs incurred.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Admin cost_report API reporting ~100× above token-rate math — $3,147 vs expected $42 for the past 7 days