Memory Usage
Per-memID request counts, injected tokens, and last-used, plus embed cost.
MUST stay declared ABOVE GET /{slug_or_id} — FastAPI matches in
declaration order, so below it “usage” is read as a slug and this route is
unreachable (404, from a memory nobody owns).
Scoped to the CALLER’S OWN keys, not the whole org, and that is the honest
scope rather than a shortcut: injection is owner-scoped in the gateway, so a
colleague’s memID cannot be attached by your keys at all. It also sidesteps a
real ambiguity — memory_slugs records slugs, and slugs are unique per
(owner, slug) rather than per org, so an org-wide aggregate would silently
merge two members’ identically-named memories into one row.
Every token figure is OUR tokenizer’s estimate of what the injected block
cost, not a provider-reported number: no upstream reports the split between
the memory block and the rest of the prompt. A request attaching several
memIDs logs ONE block size, which is split equally across them here — see
the subquery. Hence injected_tokens_est, and hence no derived dollar figure
beside it — see MemoryUsageRow.
Authorizations
Enter your MeshAPI key (rsk_...) — sent as Authorization: Bearer <key>.
Headers
Dated version of the API contract to pin this request to. Omit it and the request is served under 2026-08 — the oldest supported version, so an existing integration is never moved by a release. A malformed or unsupported value is rejected with 400 invalid_api_version rather than falling back silently. The version actually served is echoed as X-Mesh-Version on every response, including errors.
2026-08 Query Parameters
1 <= x <= 90