Skip to content
Documentation menu
docs / api / get-v1-usage
Keys and account

GET/v1/usage

Access and price

AuthAn API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Not metered: it draws no quota and no credit. A browser (maps) key may call it.
PriceNot metered: no quota, no credit.

What it does

The calling key's own metered units, day by day and endpoint by endpoint (quota-free: reading it never spends units).

An API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Not metered: it draws no quota and no credit.

Call it

bash
curl -fsS -X GET "https://api.mapmap.ai/v1/usage" \
  -H "Authorization: Bearer $MAPMAP_KEY"

Parameters

NameInTypeRequiredDescription
fromquerystringnoFirst UTC day of the window, YYYY-MM-DD, inclusive (default: first of the current month)
toquerystringnoLast 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, and for an unverified key on an account somebody has verified, which may not see or spend that account's credit.
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. An unverified key reads true on every address: its pool is the unverified keys of its address requested from the same network.
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.

Example: A response assembled from this schema's own field examples, enums, defaults and types; not a recorded call

json
{
  "balance_millipence": 0,
  "days": [
    {
      "day": "string",
      "endpoints": {}
    }
  ],
  "from": "string",
  "identity_pooled": false,
  "key_id": "string",
  "month_used": 0,
  "monthly_quota": 0,
  "to": "string",
  "total_units": 0,
  "totals": {}
}
400Malformed date, from after to, or a window longer than 92 days

application/problem+json · Problem

401Missing, unknown, revoked or expired key. Also: No key, or a missing, malformed, unknown, revoked or expired one (unauthorized)

application/problem+json · Problem

504The request did not finish within the gateway's request deadline (request-timeout)

application/problem+json · Problem

Error bodies follow the shared problem model documented on API conventions.

Also under Keys and account

Generated from https://api.mapmap.ai/openapi.json on 2026-11-12 · operationId usage_self