Usage
Usage endpoints let you inspect workspace allowances, review per-client consumption, and manage client-level AI caps. Usage metrics include identified recipients, anonymous recipients, narration characters, image generations, AI tokens, and API seats.
Get integration setup status
Read your workspace's setup progress and current allowances using your API key. The response includes the workspace, course and theme IDs, keyMode (test or production), completion status, and steps for course, key, call, link, open and completion. Each step has done and at fields. lastFailure includes a suggested fix, or is null when no failure is newer than the latest successful call. Calling this endpoint does not count as the first successful API call.
/v1/headless/setup/statusGet workspace allowances
Use this endpoint to get the current billing-period allowances and usage totals for your workspace. The response includes ir, ar, narrationUsage, imageUsage, aiTokens, and apiSeats rows.
/v1/headless/usage/allowancesGet client AI allowances
Use this endpoint to get the current monthly AI allowance rows for a client identifier. Client AI allowance rows include narration character usage and image generation usage.
/v1/headless/usage/client/{identifier}Path parameters
| Field | Description | Options |
|---|---|---|
identifier | Your stable client identifier | — |
Update client AI caps
Use this endpoint to set client-level monthly caps for narration characters and image generations. Send null for a cap to make that client unlimited for the metric. 0 stops generation of that metric for the client while client caps are enabled (clientCapsEnabled on PUT /v1/headless/usage/client-defaults).
/v1/headless/usage/client/{identifier}Path parameters
| Field | Description | Options |
|---|---|---|
identifier | Your stable client identifier | — |
Body parameters
| Field | Type | Required | Desc | Options |
|---|---|---|---|---|
narrationUsageLimit | string | integer | null | No | Characters per month; null = no cap. Zero stops narration generation. | — |
imageUsageLimit | string | integer | null | No | Image generations per month; null = no cap. Zero stops image generation. | — |
Get default AI caps for new clients
Use this endpoint to read the workspace default narration and image caps that new clients pick up at create time. Limits serialize as a number or unlimited when there is no cap. Changing these defaults does not change existing clients. The response includes mismatched, a count of existing clients whose narration or image cap differs from these defaults.
/v1/headless/usage/client-defaultsUpdate default AI caps for new clients
Use this endpoint to set the workspace default narration and image caps for newly created clients. Send only the fields you want to change. Send null for no cap. 0 stops generation of that metric for new clients while client caps are enabled (clientCapsEnabled). Existing clients are not changed. The response includes the same mismatched count as GET, recomputed against the saved defaults.
/v1/headless/usage/client-defaultsBody parameters
| Field | Type | Required | Desc | Options |
|---|---|---|---|---|
clientCapsEnabled | boolean | No | Optional boolean that enables or disables client cap enforcement, with omission retaining the current setting. | — |
narrationUsageLimit | string | integer | null | No | Optional narration character cap per client usage period for new clients, with an integer from 0 to 2147483647, `null` for no cap, or omission to keep the current default. | — |
imageUsageLimit | string | integer | null | No | Optional image generation cap per client usage period for new clients, with an integer from 0 to 2147483647, `null` for no cap, or omission to keep the current default. | — |
Apply default AI caps to existing clients
Use this endpoint to overwrite every existing client's narration and image caps with the current workspace defaults, including caps the partner set on individual clients. The response is updated (clients whose caps actually changed) and mismatched (clients that still differ; 0 after a successful apply).
/v1/headless/usage/client-defaults/applyGet client usage
Use this endpoint to fetch paginated usage rows for each client identifier in your workspace. You can provide a usage window with start and end; date ranges can be up to 366 days.
/v1/headless/usage/clientsQuery parameters
| Field | Type | Required | Default | Description | Options |
|---|---|---|---|---|---|
start | string | No | — | ISO 8601 date — start of the usage window (defaults to 30 days ago) | — |
end | string | No | — | ISO 8601 date — end of the usage window (defaults to now). Max window 366 days. | — |
page | string | integer | No | 0 | Zero-indexed page number | — |
length | string | integer | No | 50 | Maximum number of clients per page (max 50) | — |