---
title: "Get workspace credit balance"
method: GET
path: "/v1/workspaces/{workspace_id}/billing/credit-balance"
tags: ["billing-usage"]
---

# Get workspace credit balance

`GET /v1/workspaces/{workspace_id}/billing/credit-balance`

**Plan:** `Enterprise`

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

## Path parameters

- `workspace_id` string, required — Workspace ID

## Response `200`

OK

- V1WorkspaceCreditsBody
  - `billing_period` V1BillingPeriod, required
    - `end` string, date-time, required — Exclusive end of the period these credit figures cover (RFC3339, UTC).
    - `start` string, date-time, required — Inclusive start of the period these credit figures cover (RFC3339, UTC).
  - `daily_limit` number, double, required — Daily credit limit for this workspace.
  - `daily_remaining` number, double, required — Remaining credits from today's daily grants.
  - `expiring_grants` V1WorkspaceCreditsExpiringGrant[], nullable, required — All future grant expiry groups sorted by date (excluding daily/overage).
    - `applicability` string — What the expiring credits apply to (e.g. build_time, cloud, ai_gateway).
    - `credits` number, double, required — Total credits expiring at this date.
    - `expires_at` string, date-time, required — When these credits expire.
    - `grant_type` string, required — Display bucket: billing, rollover, topup, commitment, cashback, or granted.
  - `grant_type_balances` V1WorkspaceCreditsGrantTypeBalance[], nullable, required — Per-display-bucket credit balances.
    - `grant_type` string, required — Display bucket: billing, daily, rollover, topup, commitment, cashback, or granted.
    - `granted` number, double, required — Total credits granted for this type.
    - `remaining` number, double, required — Remaining credits for this type.
  - `total_billing_period_used` number, double, required — Credits used in the current billing period (see billing_period for the exact window).
  - `total_granted` number, double, required — Total credits granted across all active grants.
  - `total_remaining` number, double, required — Total remaining credits across all active grants.

## Other responses

- `401` — Missing or invalid API key.
- `402` — This operation or requested configuration requires a workspace plan that includes this feature.
- `403` — The key or caller lacks the required scope or permission.
- `406` — The Accept header excludes every media type this endpoint produces.
- `429` — Too many requests. Retry after the interval in Retry-After when present.
- `default` — Error. The response body uses the standard error envelope; status matches the HTTP status code and type is a machine-readable error code.

---

[API](https://skmtc.net/lovable/apis/lovable-api.md) · [All operations](https://skmtc.net/lovable/apis/lovable-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lovable/lovable-api/revisions/aa8d44585147/schema)
