Sessions
Page a session's model calls
GET
applicationKeyheader
AuthorizationBearer <token>An application key of the Tenant (PUT /v1/tenant/keys/{keyId}), or Studio's key, derived from the admin key. With Nylorun-Subject and Nylorun-Scopes, it acts for that person, narrowed to those scopes. Never accepted from a browser (Origin).
sessionId*stringturnId?stringlimit?integerA page holds at most the Tenant's Runtime limit pageItems (default 200); a larger limit gets that many. Default 50, or that limit when it is lower
Range
1 <= valuecursor?stringNylorun-Protocol*stringThe protocol version, 18
Recorded usage, including duplicate billed calls
application/json- response
calls*array<>nextCursor*string|nullasOf*stringimport { createClient } from "@nylorun/agents";const client = await createClient();const calls = await client.session("ses_123").modelCalls({ limit: 50 });{ "calls": [ { "id": "string", "effectId": "string", "sessionId": "string", "turnId": "string", "manifestName": "string", "provider": "string", "model": "string", "at": "string", "startedAt": "string", "endedAt": "string", "outcome": "completed", "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "cachedTokens": 0, "cacheWriteTokens": 0, "reasoningTokens": 0, "costUsd": 0, "duplicate": true, "tokensReported": true, "costKnown": true, "costSplit": { "input": 0, "cacheRead": 0, "cacheWrite": 0, "output": 0 } } } ], "nextCursor": "string", "asOf": "string"}