# Usage & Quotas

Read usage attribution for the current key over a required time range.

## Usage summary

`client.usage.get({ start, end })` (`GET /v1/usage`) returns the usage summary for the current key. The gateway **requires both `start` and `end`** — each an ISO-8601 timestamp or unix-seconds number; the call fails without a range. The scope is `usage:read`.

```bash
const end = new Date();
const start = new Date(end.getTime() - 7 * 24 * 60 * 60 * 1000);
const usage = await client.usage.get({
  start: start.toISOString(),
  end: end.toISOString(),
});
```

## Over curl

The same call without the SDK passes both bounds as query parameters:

```bash
curl "https://seachat.ai/v1/usage?start=2026-06-22T00:00:00Z&end=2026-06-29T00:00:00Z" \
  -H "Authorization: Bearer $SEACHAT_API_KEY"
```

## Quota source of truth

Usage attribution records user, request, provider, modality, model, and route context. API-key policy fields such as `spendLimitMicros` constrain a key, but account quotas remain the source of truth for runtime spend enforcement.

