NylorunDocsBeta
Runtime APISessions

Page a session's model calls

GET
/v1/sessions/{sessionId}/calls/model

Authorization

applicationKey
headerAuthorizationBearer <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).

Path Parameters

sessionId*string

Query Parameters

turnId?string
limit?integer
Range1 <= value <= 200
Default50
cursor?string

Header Parameters

Nylorun-Protocol*string

The protocol version, 8

Response Body

Recorded usage, including duplicate billed calls

application/json
  1. response
calls*array<>
nextCursor*string|null
asOf*string
import { 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"}