Skip to content

Spend

GET /api/orgs/{org_id}/spend/agents/{agent_id}

Section titled “GET /api/orgs/{org_id}/spend/agents/{agent_id}”

Get Agent Spend

One agent’s spend, plus the tool calls and metered activity behind it.

The drill-down from the overview’s agent table. Most tools carry no price of their own — the cost of a tool call is the LLM turn it forces, not the call — so the tool table leads with call and error counts rather than dollars.

Parameters

NameInTypeRequiredDescription
agent_idpathstring (uuid)yes
daysqueryintegernoWindow size in days, ending now.
org_idpathstring (uuid)yes

Responses

StatusDescriptionBody
200Successful ResponseAgentSpendDetail
422Validation ErrorHTTPValidationError

Get Spend Overview

What the org spent in the window, grouped by agent, model and chat.

Each grouping is capped at a top-N by spend; truncated says when that bit, so a panel can say so rather than implying these were all the spenders there were.

Parameters

NameInTypeRequiredDescription
daysqueryintegernoWindow size in days, ending now.
org_idpathstring (uuid)yes

Responses

StatusDescriptionBody
200Successful ResponseSpendOverview
422Validation ErrorHTTPValidationError