Documentation menu
self-serve
GET/v1/usage
API key required, sent as Authorization: Bearer snk_… or ?api_key=snk_….
Call it
bash
curl -fsS -X GET "https://api.mapmap.ai/v1/usage" \
-H "Authorization: Bearer $MAPMAP_KEY"Parameters
| Name | In | Required | Description |
|---|---|---|---|
| from | query | no | First UTC day of the window, YYYY-MM-DD, inclusive (default: first of the current month) |
| to | query | no | Last UTC day of the window, YYYY-MM-DD, inclusive (default: today) |
Responses
200Weighted quota units for the calling key (identity-pooled where the key has an identity)
| Field | Type | Required | Description |
|---|---|---|---|
| balance_millipence | integer | yes | Prepaid credit balance of the owning identity, in internal millipence (1p = 1000 millipence); 0 for keys with no ledger. |
| days | UsageDayUnits[] | yes | Per-day breakdown, oldest day first. Days with no recorded units are omitted rather than reported as zero. |
| from | string | yes | First day of the reported window, YYYY-MM-DD UTC, inclusive. |
| identity_pooled | boolean | yes | Whether the figures below are pooled across the owning identity's keys. True for self-served keys, whose monthly quota is held by the identity and shared by its keys; false for operator keys, which have no identity and are metered individually. |
| key_id | string | yes | Key id (UUID) of the calling key. |
| month_used | integer | yes | Units counted against the monthly quota right now — the very
number the quota check enforces on, so it always agrees with
used_this_month on GET /v1/keys/self. Identity-pooled where
applicable, and it includes units buffered but not yet flushed to
usage_counters, so it can exceed total_units for a window that
covers the whole month. Independent of from/to. |
| monthly_quota | integer | yes | Units allowed per calendar month (identity-bound for self-served keys). |
| to | string | yes | Last day of the reported window, YYYY-MM-DD UTC, inclusive. |
| total_units | integer | yes | Total weighted quota units across the whole window. |
| totals | object | yes | Window totals in weighted quota units, keyed by endpoint label. |
400Malformed date,
from after to, or a window longer than 92 days401Missing, unknown, revoked or expired key
Error bodies follow the shared problem model documented on API conventions.
Also under self-serve
Generated from https://api.mapmap.ai/openapi.json on 2026-09-17 · operationId usage_self