---
title: "retrieve credit usage for the current billing period"
method: GET
path: "/usage/credits"
tags: ["Usage"]
---

# retrieve credit usage for the current billing period

`GET /usage/credits`

Credit allotment, consumption to date, and cap-enforcement state for a workspace's current billing period

## Query parameters

- `organization_id` string, required

## Response `200`

Credit usage for the workspace's current billing period.

- WorkspaceCreditUsage — Credit usage for a workspace's current billing period. Usage figures are facts about the workspace and are returned whenever computable, independent of whether cap enforcement applies. All numeric fields are absent when the workspace has no credit model (legacy account), no billing period is computable, or the underlying read failed -- absence is not a statement about configuration.
  - `organization_id` string
  - `cap_enforcement_enabled` boolean — True when the workspace has opted into enforcement (allocations.enforce_limit) on an explicit credit allocation and is not exempt (e.g. trial). False means the allocation is informational only
  - `period_start` integer — Billing period start, epoch millis UTC (inclusive)
  - `period_end` integer — Billing period end, epoch millis UTC (exclusive)
  - `allotment_centicredits` integer — Effective credit allocation in centicredits. Also absent when no credit allocation is configured for the workspace
  - `consumed_centicredits` integer — Centicredits consumed so far this period (near-real-time, ~10 minute lag)
  - `estimated_in_flight_centicredits` integer — Estimated centicredits for currently running cloud tests. Also absent when the estimate is temporarily unavailable (e.g. its underlying counts could not be read)

## Other responses

- `default` — Unknown error

---

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