Get Token Breakdown

Per-agent session token consumption breakdown.

For each agent session shows where the context budget was spent: system prompt (Bernstein overhead), context files, task description, tool call results accumulated at runtime, and assistant output.

Identifies optimization opportunities - e.g. if 60% of tokens are context files the agent never used.

Args: request: FastAPI request. session_id: If provided, return breakdown for a single session only.

Returns: JSON with sessions list and aggregate summary.

get/api/v1/costs/token-breakdown

Request

  • Base URL: http://127.0.0.1:8052
  • URL: http://127.0.0.1:8052/api/v1/costs/token-breakdown
  • Auth: none declared

Query parameters

session_idstring nullable

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.