Feature Request: Expose enterprise spending limit & remaining budget via /api/oauth/usage

Resolved 💬 2 comments Opened Mar 14, 2026 by hongjun-bae Closed Mar 14, 2026

Summary

The /api/oauth/usage endpoint currently returns five_hour and seven_day utilization data for subscription plans, but returns no usage data for enterprise plans.

Enterprise users have per-user monthly spending limits (e.g., $1,000/month) visible only in the Console UI (Settings > Usage), but there is no programmatic way to retrieve:

  • Spending limit ceiling
  • Current spend
  • Remaining budget
  • Reset date (e.g., resets on the 1st of next month)

Use Case

I maintain cc-statusline, a Claude Code statusline extension that displays real-time usage information. For subscription plans, it shows 5h/7d utilization with reset timers. For enterprise plans, it can only show session cost estimates since the API provides no budget/limit data.

Enterprise users would benefit from seeing their remaining budget directly in the statusline — similar to how subscription users see their 5h/7d limits.

Proposed API Response

For enterprise plans, the /api/oauth/usage endpoint could return something like:

{
  "spending_limit": {
    "limit_usd": 1000.00,
    "used_usd": 133.49,
    "utilization": 13.35,
    "resets_at": "2025-05-01T00:00:00Z"
  }
}

This would be consistent with the existing five_hour/seven_day response structure for subscription plans.

Current Workarounds

  • Admin API (/v1/organizations/cost_report): Requires an admin API key (sk-ant-admin...), not suitable for individual end-users.
  • Console UI: Manual check only, not programmatically accessible.

Environment

  • Claude Code Enterprise plan
  • Using OAuth token authentication
  • Endpoint: GET https://api.anthropic.com/api/oauth/usage
  • Beta header: anthropic-beta: oauth-2025-04-20

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗