Skip to navigation

Usage By Language

Return workspace audio generation usage broken down by language.

Each row represents one locale with its share of total credit and character consumption. share is a 0..1 fraction of workspace-wide usage for the period; multiply by 100 for a percentage.

Period selection: supply activity_view to align the language rows with the same period shown on the Usage dashboard chart (daily = last 7 local days, weekly = last 12 Monday-start weeks, monthly = last 12 months). When activity_view is provided, range is ignored and range in the response is null. Omit activity_view to use the rolling range window instead.

Date boundaries are computed in the supplied timezone (IANA). Defaults to UTC.

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_viewenum or nullOptional
Optional activity view period to align language rows with the selected Usage tab. When supplied, range is ignored and range in the response is null.
Allowed values:
timezonestringOptionalDefaults to UTC
IANA timezone for local day bucketing.

Response

Successful Response
dataobject
metaobject

Errors

422
Unprocessable Entity Error