# Credits (/docs/api/credits)

Credit balance and usage.

## Get Credit Balance

`GET https://api.presentations.ai/api/v1/credits`

Return the workspace's granted, held, consumed, and available credits.

`active_granted` is what grants in effect give, `active_holds` what in-flight work
reserves, `total_consumed` what was spent, and `available` what can still be spent.

**Responses**

- `200`: CreditBalance — Successful Response
- `401`: APIErrorResponse — Missing, malformed, expired, or revoked Bearer API key. `error.code`: `UNAUTHENTICATED`, `INVALID_TOKEN`.
- `403`: APIErrorResponse — The API key, workspace role, project scope, or plan lacks permission. `error.code`: `FORBIDDEN`, `FEATURE_NOT_IN_PLAN`, `PLAN_LIMIT_EXCEEDED`.
- `429`: APIErrorResponse — The caller exceeded the API rate limit. `error.code`: `RATE_LIMITED`.
- `500`: APIErrorResponse — Unexpected server failure. Retry only idempotent operations and retain trace_id. `error.code`: `INTERNAL_ERROR`.

# Schemas

### CreditBalance

Workspace credit balance summary.

- `workspace_id` (string (uuid), required) — Workspace the balance belongs to.
- `available` (integer, required) — `active_granted` minus `total_consumed`; may be negative. New paid work starts only while it is above zero.
- `active_granted` (integer, required) — Credits from grants in effect and not expired.
- `total_consumed` (integer, required) — Credits consumed over the workspace's lifetime.
- `active_holds` (integer, required) — Credits reserved by in-flight work; always 0.