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
--days:
usage requires sign-in — it reads the account tied
to your token.From the SDK
The rollup fields
| Field | Meaning |
|---|---|
window_days | The trailing window the numbers cover. |
total_calls | Every metered call in the window. |
by_route | Calls per endpoint, e.g. sessions.step, anticipators.protect. |
sessions_opened | sessions.create calls. |
steps_taken | step + perceive calls. |
anticipators_opened | anticipators.create calls. |
protects_checked | anticipators.protect calls. |
sessions_touched | Distinct session ids seen. |
anticipators_touched | Distinct anticipator ids seen. |
first_used / last_used | First/last metered call in the window (or null). |
What counts, and what doesn’t
Every gated call is metered
Opening, stepping, perceiving, inspecting, and closing sessions and
anticipators each record exactly one usage row.
Open + read routes are not metered
version (open) and reading usage itself are not counted — checking
your usage never inflates it.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.