# List rollup

URL: https://docs.hanzo.ai/docs/openapi/billing/get-billing-usage-rollup

> Answers the caller's month: what their plan includes, what has been consumed against it, and the wallet beside it.

`GET /v1/billing/usage/rollup`

> [Billing →](https://docs.hanzo.ai/docs/openapi/billing) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                                |
| ------------- | ---------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/billing/usage/rollup` |
| **Method**    | `GET`                                          |
| **Operation** | `get_billing_usage_rollup`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`         |

Answers the caller's month: what their plan includes, what has been consumed
against it, and the wallet beside it.

The two blocks are SEPARATE monies and are never added. One is usage a plan
granted; the other is prepaid credit bought with a card. Their sum is not a
number anyone holds, and a reader that formed it would be inventing a balance.

A named handler, not a closure, so zipdoc can lift this prose into the registry.

## Request

`GET /v1/billing/usage/rollup` takes no parameters and no body — the credential is the whole request.

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | billing.Rollup  | ok      |
| `default` | problem-details | refused |

`200` body — 15 fields.

| Field                     | In   | Type                    | Always | Description |
| ------------------------- | ---- | ----------------------- | ------ | ----------- |
| `balance`                 | body | billing.RollupBalance   | —      |             |
| `balance.availableCents`  | body | integer (int64)         | —      |             |
| `balance.balanceCents`    | body | integer (int64)         | —      |             |
| `balance.holdsCents`      | body | integer (int64)         | —      |             |
| `consumedCents`           | body | integer (int64)         | —      |             |
| `currency`                | body | string                  | —      |             |
| `included`                | body | billing.RollupAllotment | —      |             |
| `included.consumedCents`  | body | integer (int64)         | —      |             |
| `included.grantedCents`   | body | integer (int64)         | —      |             |
| `included.monthlyCents`   | body | integer (int64)         | —      |             |
| `included.remainingCents` | body | integer (int64)         | —      |             |
| `overageCents`            | body | integer (int64)         | —      |             |
| `period`                  | body | string                  | —      |             |
| `plan`                    | body | string                  | —      |             |
| `user`                    | body | string                  | —      |             |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo billing usage rollup
```

**SDK**

**.ts**

```ts
import { Configuration, BillingApi } from 'hanzoai';

const api = new BillingApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getBillingUsageRollup();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import BillingApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = BillingApi(client).get_billing_usage_rollup()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.BillingAPI.GetBillingUsageRollup(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, billing_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = billing_api::get_billing_usage_rollup(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.BillingApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new BillingApi(client).getBillingUsageRollup();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/billing/usage/rollup \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

Tool `billing`, op `get_billing_usage_rollup` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "billing",
         "arguments": {
           "op": "get_billing_usage_rollup",
           "input": {}
         }
       }
     }'
```

---

[Billing API](https://docs.hanzo.ai/docs/openapi/billing) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
