# Balance and usage

> Documentation index: [llms.txt](https://westkite.com/docs/llms.txt). Every page is also at its URL plus `.md`.

Returns your remaining balance, and your spend by day and by operation. Free.

```endpoint
GET /v1/balance
GET /v1/usage
```

## Check your balance

```curl
curl https://api.westkite.com/v1/balance -H "Authorization: Bearer $WESTKITE_API_KEY"
```

```typescript
const res = await fetch("https://api.westkite.com/v1/balance", {
  headers: { Authorization: `Bearer ${process.env.WESTKITE_API_KEY}` },
});
const { data } = await res.json();
```

```python
import os, requests

data = requests.get(
    "https://api.westkite.com/v1/balance",
    headers={"Authorization": f"Bearer {os.environ['WESTKITE_API_KEY']}"},
).json()["data"]
```

```json 200
{
  "data": {
    "plan": "starter",
    "balance_usd": 43.7,
    "available_usd": 42.7,
    "included_resets_at": "2026-12-01T00:00:00.000Z",
    "limits": { "requests_per_minute": 300, "concurrent": 10, "research_concurrent": 25 },
    "key": { "id": "9f0e…", "name": "Research agent", "scopes": ["data", "research", "contacts"] }
  },
  "missing": [],
  "billing": { "operation_id": "op_08ce…", "operation": "account", "charged_usd": 0, "balance_usd": 43.7 },
  "request_id": "req_08ce…"
}
```

`balance_usd` is your included usage and purchased balance together. `available_usd` is what's left after amounts held for calls in flight, such as running research. Included usage resets at `included_resets_at` and doesn't roll over; purchased balance never expires. See [Pricing and billing](https://westkite.com/docs/api/pricing.md).

## Usage

| Name | Type | Description |
|---|---|---|
| `days` | integer | How many days back, 1 to 30. Default 7. |

```curl
curl "https://api.westkite.com/v1/usage?days=7" -H "Authorization: Bearer $WESTKITE_API_KEY"
```

```json 200
{
  "data": {
    "days": 7,
    "series": [
      { "date": "2026-11-14", "calls": 412, "ok": 401, "client_errors": 8, "rate_limited": 3, "server_errors": 0, "charged_usd": 3.18 },
      { "date": "2026-11-15", "calls": 96, "ok": 96, "client_errors": 0, "rate_limited": 0, "server_errors": 0, "charged_usd": 0.71 }
    ],
    "by_operation": [
      { "operation": "find", "calls": 140, "charged_usd": 2.6 },
      { "operation": "property", "calls": 129, "charged_usd": 1.29 },
      { "operation": "search", "calls": 239, "charged_usd": 0 }
    ]
  },
  "missing": [],
  "billing": { "operation_id": "op_6f1a…", "operation": "account", "charged_usd": 0, "balance_usd": 43.7 },
  "request_id": "req_6f1a…"
}
```

Usage covers your whole team. The dashboard shows it by key too, with a log of every request for the last 30 days.
