Interlaken
API referenceAgents and workflowsAgent sessions

Session usage: context-window footprint + provider subscription limits

GET
/api/v1/agent-sessions/{id}/usage

Requires the agent_sessions:read permission.

Sourced from the provider's own usage APIs (Anthropic OAuth usage for claude; the ChatGPT backend for codex) plus the guest's per-turn context accounting.

Authorization

AuthorizationBearer <token>

An access token from this zone's POST /oauth/token, or a session token from POST /api/v1/auth/login. Send it as Authorization: Bearer <token>.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/agent-sessions/string/usage"
{  "context_used_tokens": 0,  "context_window_tokens": 0,  "credits_balance": "string",  "credits_limit": "string",  "credits_used": "string",  "limits": [    {      "active": true,      "label": "string",      "percent": 0,      "resets_at": "2019-08-24T14:15:22Z"    }  ],  "plan": "string"}