v1

latestOpenAPI 3.1.12026-07-17146175447.5 KB
Session

Get session usage

Aggregate token and cost usage across the session and all its descendant subagents. Resolves the tree root, so the result is the same whether a parent or child session ID is passed.

get/session/{sessionID}/usage

Path parameters

sessionIDstring required

Query parameters

directorystring

Response

Aggregated usage

rootIDstring required
totalCostnumber required
totalTokensnumber required
sessionCountnumber required