Usage API

View as Markdown

Query egress usage and billing data for the authenticated workspace.

GET /v1/usage

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

Response 200:

1{
2 "period": "current",
3 "from": "2026-06-01T00:00:00Z",
4 "to": "2026-06-13T11:16:13.654Z",
5 "totals": {
6 "bytes_up": 22152347,
7 "bytes_down": 324499563,
8 "bytes_total": 346651910,
9 "sessions": 54,
10 "billed_micro_usd": 1733259
11 },
12 "by_region": [
13 {
14 "region": "eu",
15 "sessions": 54,
16 "bytes_total": 346651910,
17 "billed_micro_usd": 1733259
18 }
19 ],
20 "by_key": [
21 {
22 "key_id": "68c58c43-dafc-433c-9d19-3719ab740159",
23 "key_prefix": "cha_live_qMRiH5q",
24 "key_name": "a",
25 "sessions": 25,
26 "bytes_total": 289218898,
27 "billed_micro_usd": 1446094
28 }
29 ],
30 "by_day": [
31 {
32 "date": "2026-06-12",
33 "bytes_total": 22939660,
34 "sessions": 23
35 },
36 {
37 "date": "2026-06-13",
38 "bytes_total": 323712250,
39 "sessions": 31
40 }
41 ]
42}

Fields:

FieldDescription
periodAlways "current" (current billing period).
from / toTime range covered.
totals.bytes_totalTotal egress bytes (up + down).
totals.billed_micro_usdTotal charge in micro-dollars (1,000,000 µ==1).
by_regionBreakdown by egress region.
by_keyBreakdown by API key.
by_dayDaily 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,1GBofegresscostsexactly5/GB, 1 GB of egress costs exactly 5. A transfer of 200 MB costs $1.