> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.chaser.sh/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.chaser.sh/_mcp/server.

# Usage API

Query egress usage and billing data for the authenticated workspace.

## GET /v1/usage

```bash
curl -s "https://api.chaser.sh/v1/usage" \
  -H "Authorization: Bearer $CHASER_KEY" | jq
```

**Response `200`:**

```json
{
  "period": "current",
  "from": "2026-06-01T00:00:00Z",
  "to": "2026-06-13T11:16:13.654Z",
  "totals": {
    "bytes_up": 22152347,
    "bytes_down": 324499563,
    "bytes_total": 346651910,
    "sessions": 54,
    "billed_micro_usd": 1733259
  },
  "by_region": [
    {
      "region": "eu",
      "sessions": 54,
      "bytes_total": 346651910,
      "billed_micro_usd": 1733259
    }
  ],
  "by_key": [
    {
      "key_id": "68c58c43-dafc-433c-9d19-3719ab740159",
      "key_prefix": "cha_live_qMRiH5q",
      "key_name": "a",
      "sessions": 25,
      "bytes_total": 289218898,
      "billed_micro_usd": 1446094
    }
  ],
  "by_day": [
    {
      "date": "2026-06-12",
      "bytes_total": 22939660,
      "sessions": 23
    },
    {
      "date": "2026-06-13",
      "bytes_total": 323712250,
      "sessions": 31
    }
  ]
}
```

**Fields:**

| Field | Description |
|---|---|
| `period` | Always `"current"` (current billing period). |
| `from` / `to` | Time range covered. |
| `totals.bytes_total` | Total egress bytes (up + down). |
| `totals.billed_micro_usd` | Total charge in micro-dollars (1,000,000 µ$ = $1). |
| `by_region` | Breakdown by egress region. |
| `by_key` | Breakdown by API key. |
| `by_day` | Daily breakdown. Days with zero usage show `"sessions": 0, "bytes_total": 0`. |

## Calculating cost

```
cost_usd = billed_micro_usd / 1,000,000
         = bytes_total × $5 / 1,000,000,000
```

At $5/GB, 1 GB of egress costs exactly $5. A transfer of 200 MB costs $1.