---
title: "Token accounting session snapshot"
method: GET
path: "/v1/token-accounting/session"
tags: ["System"]
---

# Token accounting session snapshot

`GET /v1/token-accounting/session`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/token-accounting/session`
- Auth: HTTP bearer

The durable ledger's projection of one session — known subtotals by quantity and category, attempt counts, and whether totals and pricing are complete. Carries ledger health and revision. An unreadable ledger answers with a null snapshot, never an empty one. Counts and revisions only; no prompt or output content.

## Query parameters

- `session_id` string, required

## Response `200`

Session read

- TokenLedgerSessionRead
  - `storeId` string, nullable
  - `health` TokenLedgerHealth, required: Store-wide accounting health (shared contract shared/types/contracts/token-accounting.ts). `degraded` means a write failed and observations are held in memory; `unavailable` means the store could not be opened.
    - `state` 'available' | 'degraded' | 'unavailable', required
    - `fault` 'busy' | 'diskFull' | 'permissionDenied' | 'corrupt' | 'migrationFailed' | 'ownedByAnotherProcess' | 'ioError', nullable
    - `nonDurableObservations` integer, required
    - `suppressedObservations` integer, required
    - `quarantinedAttempts` integer, required
    - `unresolvedAttempts` integer, required
    - `oldestUnresolvedAt` string, date-time, nullable
  - `snapshot` TokenSessionSnapshot
    - `sessionId` string, required
    - `ledgerRevision` integer, required
    - `subtotals` TokenCount[], required
      - `quantity` string, required
      - `category` string, required
      - `relation` 'inclusiveTotal' | 'subset' | 'disjoint', required
      - `derived` boolean, required
      - `value` integer, nullable
      - `contractRef` object, nullable
    - `unresolvedAttempts` integer, required
    - `totalAttempts` integer, required
    - `quarantinedAttempts` integer, required
    - `totalsComplete` boolean, required
    - `pricingCovered` boolean, required
  - `sessionDeleted` boolean, required

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
