Skip to content

Feature request: public API for standard API balance, resource packages, and billing usage #71

Description

@Marksman4971

Hi Z.ai team,

I am using the Z.ai / BigModel standard API with GLM-5.1 resource packages. I noticed that GLM Coding Plan already has usage-query support through monitoring endpoints, but I could not find an official public API for standard API billing data.

Could you consider adding documented API endpoints, or SDK methods, for:

  1. Current account balance
  2. Resource package balance and expiry date, for example GLM-5.1 token packages
  3. Per-model usage in a date range
  4. Monthly bill / cost summary
  5. Whether a request was deducted from cash balance, free quota, voucher, or resource package

This would help users build internal cost dashboards, weekly usage summaries, and budget alerts.

Additional context:

In my current multi-provider setup, several major providers already expose official or documented ways to retrieve balance or billing signals:

  • DeepSeek provides a /user/balance API.
  • Moonshot/Kimi provides a balance API.
  • Alibaba Cloud exposes account balance and billing data through BSS OpenAPI, which can be used for Bailian / Model Studio cost tracking.
  • Z.ai itself already provides usage-query endpoints for GLM Coding Plan.

The missing piece is the standard BigModel API account/resource-package path. For users who buy GLM-5.1 token packages or use prepaid resources, there does not seem to be a clearly documented API to check remaining quota, package expiry, or deduction source.

Current behavior observed:

  • /api/monitor/usage/quota/limit appears to work only for Coding Plan users.
  • For a standard BigModel API key, it returns: ???????coding plan.
  • The standard API key can call glm-5.1 successfully.
  • The standard API response includes token usage, but does not expose remaining resource-package quota or deduction source.

Expected:

A stable documented API or SDK method for standard API billing/resource-package usage, separate from Coding Plan.

This would make automated cost tracking easier and more consistent with other providers.

Thanks.

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