> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paradime.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Admin client: usage

> Read Bolt billed run time and DinoAI credits for a period, in total or per workspace, from Python with paradime.admin.usage, the same numbers as the Usage page.

`paradime.admin.usage` reads Bolt and DinoAI usage in a period: the numbers that the Usage page shows. For the GraphQL operations, see [Usage](https://docs.paradime.io/developers/graphql-api/admin-api/usage).

> [!NOTE]
>
> **Prerequisites**
>
> * These operations are part of the Enterprise plan. On other plans, they raise `AdminPlanUpgradeRequiredException`.
> * Your API key needs the **Usage viewer** capability group.
> * The admin client of the `paradime-io` package. See [Admin client](https://docs.paradime.io/developers/python-sdk/modules/admin/index).

The examples on this page use this client. Usage calls need no workspace, so the client has no `workspace_uid`:

```python theme={"system"}
from paradime import Paradime

paradime = Paradime(api_endpoint="API_ENDPOINT", api_secret="prdm_cmp_...")
```

A period starts at `period_from` (included) and ends at `period_to` (excluded). It can be at most 366 days long. A `datetime` without a timezone is UTC. A UTC calendar month gives the numbers that the Usage page shows for that month. Deleted workspaces are left out, and a recent period can still grow while runs end.

## Get usage

Reads Bolt and DinoAI usage in a period, summed over the workspaces you ask for.

**period\_from** `datetime` *required*

When the period starts, included.

**period\_to** `datetime` *required*

When the period ends, excluded. At most 366 days after `period_from`.

**workspace\_uid** `Optional[str]` (default: None)

One workspace to sum. Leave it out for every workspace that the API key can reach.

**Returns** `Optional[Usage]`

The usage, or `None` when the server returned none.

```python theme={"system"}
from datetime import datetime

usage = paradime.admin.usage.get(datetime(2026, 10, 1), datetime(2026, 11, 1))
print(usage.dino_ai.credits, usage.dino_ai.background_agent_credits)
print(usage.bolt.billed_seconds / 60, "Bolt minutes")
```

## List usage per workspace

Iterates over a period's usage one workspace at a time, ordered by workspace uid.

**period\_from** `datetime` *required*

When the period starts, included.

**period\_to** `datetime` *required*

When the period ends, excluded.

**workspace\_uid** `Optional[str]` (default: None)

Only this workspace.

**page\_size** `int` (default: 100)

How many workspaces to read per request, at most 500.

**Returns** `Iterator[WorkspaceUsage]`

Each workspace's usage, read one page at a time.

```python theme={"system"}
from datetime import datetime

for row in paradime.admin.usage.list_workspaces(datetime(2026, 10, 1), datetime(2026, 11, 1)):
    print(row.workspace.name, row.dino_ai.credits, row.bolt.billed_seconds)
```

## Types

Import the models from `paradime.apis.admin.usage.types`.

**Usage** `model`

**fields**

**period\_from** `datetime`

When the period starts, in UTC.

**period\_to** `datetime`

When the period ends, excluded, in UTC.

**dino\_ai** `DinoAiUsage`

`credits`: the DinoAI credits spent, the DinoAI figure on the Usage page. `background_agent_credits`: the part of `credits` that DinoAI agents spent running in the background, the Agents figure on the Usage page.

**bolt** `BoltUsage`

`billed_seconds`: the Bolt run time billed, in seconds. Divide by 60 for minutes.

**WorkspaceUsage** `model`

**fields**

**workspace** `UsageWorkspace`

The workspace's `uid` and `name`.

**dino\_ai** `DinoAiUsage`

The workspace's DinoAI credits.

**bolt** `BoltUsage`

The workspace's billed Bolt run time.


## Related topics

- [Admin client](https://docs.paradime.io/developers/python-sdk/modules/admin/index.md)
- [Admin CLI](https://docs.paradime.io/developers/paradime-cli/admin-cli.md)
- [Admin client: notifications](https://docs.paradime.io/developers/python-sdk/modules/admin/notifications.md)
- [Admin client: workspaces](https://docs.paradime.io/developers/python-sdk/modules/admin/workspaces.md)
- [Admin client: Bolt](https://docs.paradime.io/developers/python-sdk/modules/admin/bolt.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.