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?integerRange
1 <= value <= 200Default
50cursor?stringNylorun-Protocol*stringThe protocol version, 8
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", "sessionId": "string", "turnId": "string", "agentId": "string", "provider": "string", "model": "string", "at": "string", "outcome": "completed", "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "cachedTokens": 0, "cacheWriteTokens": 0, "reasoningTokens": 0, "costUsd": 0, "duplicate": true, "tokensReported": true, "costKnown": true } } ], "nextCursor": "string", "asOf": "string"}