Skip to content

50,000 free calls a month, card-free. Get an API key →

Documentation menu
docs / api / get-v1-usage
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

NameInRequiredDescription
fromquerynoFirst UTC day of the window, YYYY-MM-DD, inclusive (default: first of the current month)
toquerynoLast 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)
FieldTypeRequiredDescription
balance_millipenceintegeryesPrepaid credit balance of the owning identity, in internal millipence (1p = 1000 millipence); 0 for keys with no ledger.
daysUsageDayUnits[]yesPer-day breakdown, oldest day first. Days with no recorded units are omitted rather than reported as zero.
fromstringyesFirst day of the reported window, YYYY-MM-DD UTC, inclusive.
identity_pooledbooleanyesWhether 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_idstringyesKey id (UUID) of the calling key.
month_usedintegeryesUnits 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_quotaintegeryesUnits allowed per calendar month (identity-bound for self-served keys).
tostringyesLast day of the reported window, YYYY-MM-DD UTC, inclusive.
total_unitsintegeryesTotal weighted quota units across the whole window.
totalsobjectyesWindow totals in weighted quota units, keyed by endpoint label.
400Malformed date, from after to, or a window longer than 92 days
401Missing, 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