Latest context breakdown
const url = 'https://app.everruns.com/api/v1/sessions/example/context-report';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://app.everruns.com/api/v1/sessions/example/context-reportParameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Session ID (prefixed, e.g., session_…)
Responses
Section titled “ Responses ”Session context report
Token-budget report for a session — a model-aware breakdown of the context window into named sections plus per-source contributions, so callers can answer “what’s filling the context?” without reverse- engineering the prompt assembly.
object
Total context window size in tokens for model. None if the model’s profile lacks limits data.
Per-source token contributions (per-tool, per-capability, per-message) for attribution.
Single-source token contribution within a ContextReportSection — the
per-tool / per-capability / per-message attribution that lets operators
see which source is eating the context window.
object
Human-readable label suitable for UI display.
Section this contribution rolls up into; matches ContextReportSection.key.
Stable id of the contributing source (capability id, tool name, message id, etc.).
Tokens this single source contributes to the assembled context.
Cumulative LLM usage observed across the session so far (token + cost rollup).
object
Actual cost of this generation in USD, as reported by the provider inline
(e.g. OpenRouter’s usage.cost, which reflects real post-routing/BYOK/cache
pricing). None for providers that do not return a cost.
Number of tokens written to cache (Anthropic-specific)
Number of tokens read from cache (reduces cost)
Estimated cost of this generation in USD, derived from the model’s static
price-table profile. Computed whenever a profile with cost data exists,
independently of actual_cost_usd, so estimate-vs-actual drift can be
reconciled. None when there is no profile cost data for the model.
Number of input/prompt tokens
Number of output/completion tokens
Estimated number of input tokens consumed by the next generation given the current context.
Model identifier the report’s token estimates target (used to scope context-window math).
Logical sections of the assembled context (system prompt, tool defs, message history, etc.) for inspection.
One logical section of the assembled LLM context (system prompt, tool definitions, message history, etc.) with its rolled-up token budget.
object
Number of items this section comprises (messages, tool defs, etc.).
Stable section key (e.g. system_prompt, tools, history). Used as a join key for contributions.
Human-readable section label suitable for UI display.
Total tokens this section contributes to the assembled context.
Prefixed session identifier this report describes.
Example generated
{ "context_window_tokens": 1, "contributions": [ { "label": "example", "section_key": "example", "source_id": "example", "tokens": 1 } ], "cumulative_usage": { "actual_cost_usd": 1, "cache_creation_tokens": 1, "cache_read_tokens": 1, "estimated_cost_usd": 1, "input_tokens": 1, "output_tokens": 1 }, "estimated_input_tokens": 1, "model": "example", "sections": [ { "items": 1, "key": "example", "label": "example", "tokens": 1 } ], "session_id": "example"}Invalid session ID
Session not found
Internal server error