billing-usage

Get workspace credit balance

Plan: Enterprise

Returns the workspace's aggregated credit balance, daily limit, billing-period usage, expiring grants, and per-bucket balances.

get/v1/workspaces/{workspace_id}/billing/credit-balance

Path parameters

workspace_idstring required

Workspace ID

Workspace ID

Response

OK

daily_limitnumber double required

Daily credit limit for this workspace.

daily_remainingnumber double required

Remaining credits from today's daily grants.

total_billing_period_usednumber double required

Credits used in the current billing period (see billing_period for the exact window).

total_grantednumber double required

Total credits granted across all active grants.

total_remainingnumber double required

Total remaining credits across all active grants.

Example response

{
  "billing_period": {
    "end": "2026-02-01T00:00:00Z",
    "start": "2026-01-01T00:00:00Z"
  },
  "daily_limit": 500,
  "daily_remaining": 300,
  "expiring_grants": [
    {
      "applicability": "build_time",
      "credits": 1500,
      "expires_at": "2026-01-15T09:30:00Z",
      "grant_type": "billing"
    }
  ],
  "grant_type_balances": [
    {
      "grant_type": "billing",
      "granted": 1500,
      "remaining": 1200
    }
  ],
  "total_billing_period_used": 500,
  "total_granted": 2000,
  "total_remaining": 1500
}

Changes

No recorded changes to this endpoint across all 10 revisions of this API.