Skip to main content
Read your account’s Bolt and DinoAI usage for a period from code, summed over the workspaces your key can reach or one workspace at a time. Use it to feed usage into your own reports or chargeback.
Prerequisites:
  • These operations are part of the Enterprise plan. On other plans, they fail with PLAN_UPGRADE_REQUIRED.
  • An account API key or a workspace API key. usage needs no X-Paradime-Workspace header: it covers every workspace the key can reach, or the one you name in workspaceUid.
  • The Usage viewer capability group.
Keys, errors, and pagination work the same in every area. See Conventions.

Operations

What the numbers count

The counters are BigInt values: read them as 64-bit integers. A recent period can still grow while runs end. Deleted workspaces are left out, so a total for a period with a deleted workspace doesn’t include that workspace’s usage.

Read usage for a period

period runs from from, included, up to to, excluded, and is at most 366 days long. A time without an offset is UTC. For a calendar month, send the first instant of the month and the first instant of the next one, in UTC. Leave out workspaceUid to sum every workspace the key can reach: a workspace key’s own, or every workspace an account key is granted. Select workspaces for the same period one workspace at a time.
To read one workspace, pass its uid in workspaceUid, or select usage on the workspace:

Errors

These are the cases specific to usage. For the error format and the codes every area shares, see Errors.