Docs

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.

GET/v1/headless/setup/status

Get 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.

GET/v1/headless/usage/allowances

Get 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.

GET/v1/headless/usage/client/{identifier}

Path parameters

FieldDescriptionOptions
identifierYour 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).

PUT/v1/headless/usage/client/{identifier}

Path parameters

FieldDescriptionOptions
identifierYour stable client identifier—

Body parameters

FieldTypeRequiredDescOptions
narrationUsageLimitstring | integer | nullNoCharacters per month; null = no cap. Zero stops narration generation.—
imageUsageLimitstring | integer | nullNoImage 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.

GET/v1/headless/usage/client-defaults

Update 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.

PUT/v1/headless/usage/client-defaults

Body parameters

FieldTypeRequiredDescOptions
clientCapsEnabledbooleanNoOptional boolean that enables or disables client cap enforcement, with omission retaining the current setting.—
narrationUsageLimitstring | integer | nullNoOptional 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.—
imageUsageLimitstring | integer | nullNoOptional 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).

POST/v1/headless/usage/client-defaults/apply

Get 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.

GET/v1/headless/usage/clients

Query parameters

FieldTypeRequiredDefaultDescriptionOptions
startstringNo—ISO 8601 date — start of the usage window (defaults to 30 days ago)—
endstringNo—ISO 8601 date — end of the usage window (defaults to now). Max window 366 days.—
pagestring | integerNo0Zero-indexed page number—
lengthstring | integerNo50Maximum number of clients per page (max 50)—