> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Usage

> `composio.experimental.usage` — metering for the project the API key belongs to. **Experimental — shape may change in future releases.**

## Usage

Access this class through the `composio.usage` property:

```typescript theme={null}
const composio = new Composio({ apiKey: 'your-api-key' });
const result = await composio.usage.list();
```

## Methods

### breakdown()

Usage for one metering entity type, grouped by a dimension. **Experimental — shape may change in future releases.**

```typescript theme={null}
async breakdown(entityType: string, params?: UsageBreakdownParams, requestOptions?: ComposioRequestOptions): Promise<UsageBreakdownResponse>
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `entityType` | `string` | Entity type to break down (e.g. `tool_calls`, `sessions`) |
| `params?` | `UsageBreakdownParams` | Optional range, `groupBy`, ordering, `limit` and filters |
| `requestOptions?` | `ComposioRequestOptions` | |

**Returns**

`Promise<UsageBreakdownResponse>` — Totals plus per-group rows

**Example**

```typescript theme={null}
const byUser = await composio.experimental.usage.breakdown('sessions', {
  groupBy: 'user_id',
  orderBy: 'event_count',
});
```

***

### summary()

Usage totals per metering entity type for a time range. **Experimental — shape may change in future releases.**

```typescript theme={null}
async summary(params?: UsageSummaryParams, requestOptions?: ComposioRequestOptions): Promise<UsageSummaryResponse>
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `params?` | `UsageSummaryParams` | Optional range, `entityTypes` and filters |
| `requestOptions?` | `ComposioRequestOptions` | |

**Returns**

`Promise<UsageSummaryResponse>` — Totals keyed by entity type and the exact USD Instant charge

**Example**

```typescript theme={null}
const summary = await composio.experimental.usage.summary({
  from: Date.now() - 7 * 24 * 60 * 60 * 1000,
  filters: { userId: ['user_123'] },
});
```

***
