cost_ledger, which is written exclusively by the internal cost-record path — there are no public write endpoints. See the Paymaster guide for the cost ledger and budget model, and the Sidecar coverage section for the known limitation around agent CLI bypass.
All read endpoints require authentication and are workspace-scoped. The write path is exclusively internal via the LLM middleware — there are no POST endpoints on the public surface.
Endpoints
Time window parameters
Most endpoints accept the same window parameters:
Two exceptions, both visible in the responses below: top spenders applies
the lower bound only and ignores
until, and spend by mission takes no
window at all — it reports one mission’s lifetime total.
Spend by crew
range, since, and until are the query parameters
described above; the workspace is taken from the authenticated session.
Response: 200 OK
Errors:
401 no workspace; 500 DB error.
Spend by agent (within a crew)
Response:
200 OK
Spend by mission
missionId is required and must identify a mission in
the caller’s workspace. The request has no body. This endpoint does not accept
a time-window query because it reports the mission’s full ledger history.
Mission-scoped spend. Window-less — sums the full mission.
Response: 200 OK
first_ts / last_ts span the activity window for the mission. When no
spend has been recorded they come back as the zero time
("0001-01-01T00:00:00Z"); the other numeric fields are 0.
Errors:
Top spenders
Unlike the
spend/* endpoints, this one applies only the lower bound: it ranks
everything from since (or the start implied by range) up to now. ?until=
is parsed and discarded, and the response echoes since without until for
that reason. Send it and nothing changes.200 OK
Subscriptions
(subscription_plan, provider). Returned rows carry call counts and token totals only — no $ figure. The subscription is a flat fee paid up front, so the marginal token cost is structurally $0; rendering “$0.00” would imply the calls are free, which they are not.
Query parameters:
Response:
200 OK
Errors:
401 no workspace; 500 DB error.
Internal: cost record
Internal only —
X-Internal-Token required. This is how the sidecar reports parsed LLM usage from inside a crew container. Agents cannot reach this endpoint directly; the sidecar runs as UID 1002 and holds the token. Authoritative scope (workspace / crew / agent IDs) is taken from the sidecar’s IPCConfig set at exec time, so an agent that captures the token still cannot forge cross-tenant attribution.