# Get Memory usage

> This month's Memory consumption for the project, with the plan quotas it is measured against. Read capReached to know whether writes are currently being refused.

`GET https://api.zavu.dev/v1/memory/usage`

This month's Memory consumption for the project, with the plan quotas it is measured against. Read `capReached` to know whether writes are currently being refused.

## Responses

### 200

Usage.

- `usage` (object, required): This month's Memory consumption for the project, with the quota it is measured against.
  - `monthKey` (string, required): The month these counters cover. They reset on the 1st.
  - `tier` (string, required): Plan tier the quotas come from.
  - `units` (integer, required): Billable units consumed this month. Units are metered from real capacity, and a write costs 5x a read.
  - `reads` (integer, required)
  - `writes` (integer, required)
  - `memAdds` (integer, required): Facts stored this month.
  - `memSearches` (integer, required): Semantic searches run this month.
  - `capReached` (boolean, required): Whether the plan's unit quota is exhausted. While true, writes are refused with `429`; reads and deletes keep working, so stored data is never locked away.
  - `quotaUnits` (integer, nullable): Units included in the plan. Null means unlimited.
  - `memoryBytes` (integer, required): Bytes currently stored across facts and collections. Items with a TTL count as zero.
  - `quotaStorageGB` (number, nullable): Storage included in the plan, in GB. Null means unlimited.

### 401

Unauthorized.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

## Example

```bash
curl -X GET "https://api.zavu.dev/v1/memory/usage" \
  -H "Authorization: Bearer $ZAVUDEV_API_KEY"
```

```typescript
import Zavudev from "@zavudev/sdk";

const zavu = new Zavudev({ apiKey: process.env.ZAVUDEV_API_KEY });

const result = await zavu.memory.usage();

console.log(result);
```
