Skip to navigation

Usage Summary

Return aggregated usage totals and activity chart data for the workspace.

Combines credit consumption, character and line counts, and workflow run statistics for the requested rolling window (range) with a chart-ready activity series (activity) bucketed by activity_view.

The credits.used field reflects the authenticated user’s own billing-period consumption; all other aggregate fields (characters, lines, runs, daily buckets, activity buckets) are workspace-scoped across all members.

Date boundaries are computed in the supplied timezone (IANA, e.g. America/New_York) so “today” and “this week” align with the caller’s local calendar. Defaults to UTC.

Use GET /usage/by-language for a language-level breakdown, or GET /usage/activity for the event-by-event feed.

Dual-auth: Bearer JWT or API key (scope workspace:read).

Authentication

AuthorizationBearer
Clerk JWT token
OR
AuthorizationBearer

Onepin live API key (op_live_...). Test and public keys are reserved in Phase 1.

Headers

X-Workspace-Idstring or nullOptional

Query parameters

rangeenumOptionalDefaults to 30d

Rolling local calendar-day range.

Allowed values:
activity_viewenumOptionalDefaults to daily

Activity chart view: daily=7 local days, weekly=12 Monday-start weeks, monthly=12 months.

Allowed values:
timezonestringOptionalDefaults to UTC
IANA timezone for local day bucketing.

Response

Successful Response
dataobject
metaobject

Errors

422
Unprocessable Entity Error