Skip to main content
Every gated megan-tk call you make is counted server-side against your account. You can read your consumption back two ways — the usage CLI command or the SDK’s tk.usage() — and both return the same per-route breakdown plus a session/anticipator rollup.

From the CLI

Change the trailing window with --days:
usage requires sign-in — it reads the account tied to your token.

From the SDK

The rollup fields

What counts, and what doesn’t

1

Every gated call is metered

Opening, stepping, perceiving, inspecting, and closing sessions and anticipators each record exactly one usage row.
2

Open + read routes are not metered

version (open) and reading usage itself are not counted — checking your usage never inflates it.
3

Metering never slows or fails a call

Rows are written in a background task, best-effort. If the metering write fails, your decision call still succeeds — you just miss that row.

Where the data lives

Usage is stored in Supabase against your account and is derived purely from your own rows — you only ever see your own numbers (the account is taken from your token, never from the request). Rate limits apply per account (see Building deep).
Running your own Cadenza API? The metering table is created by supabase/05_megantk_usage.sql, and the server needs its Supabase service_role grant on that table for both the writes and the usage read to work.

Next

Building deep

Patterns, rate limits, and error handling for production.

SDK reference

Full method and type reference.