Skip to content

[Enhancement] Add resets_on field to Admin API billing response #1491

@daskuntal75

Description

@daskuntal75

Summary

The Admin API billing endpoint returns current spend and usage metrics but omits the billing period reset date (resets_on). This date is visible in the console UI but inaccessible via API, forcing developers to hardcode it — which breaks every billing cycle.

Current behaviour

GET /v1/organizations/{org_id}/usage returns:

{
  "current_spend": 0.82,
  "customer_limit": 150.00,
  "tier_name": "Tier 2"
}

No resets_on field.

Expected behaviour

{
  "current_spend": 0.82,
  "customer_limit": 150.00,
  "tier_name": "Tier 2",
  "resets_on": "2026-06-01"
}

Why this matters

Any automation computing normalized spend or scheduling budget alerts must hardcode the reset date:

# Current forced workaround — breaks every month
RESET_DATE = "2026-06-01"  # must be manually updated
days_elapsed = (today - date.fromisoformat(RESET_DATE)).days
normalized_spend = current_spend / (days_elapsed / 30)

This breaks silently at the start of each new billing period and requires manual intervention.

Effort estimate

This field is already computed and displayed in the console UI. Exposing it via the API response appears to be a one-field addition to the serializer.

Reference

Open-source tooling impacted: https://github.com/daskuntal75/llm-cost-kit
Full issue context: https://github.com/daskuntal75/llm-cost-kit/blob/main/docs/anthropic-issues-submit-ready.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions