FruxonDocs
AgentsRevisions

Gets aggregated per-model token usage for a specific agent revision or all revisions.

Returns one row per `(provider, model)` pair seen in this revision's executions, summing input tokens, output tokens, and call counts so callers can rank model spend and detect drift after a revision change. Pass `*` as the revision to aggregate across every revision the agent has ever run, which is useful for top-of-funnel dashboards; pass a specific revision number to attribute usage to one deployed version. Pair with the revision cost endpoints for dollar-cost breakdowns rather than raw tokens.

GET
/v1/tenants/{tenant}/agents/{agent}/revisions/{revision}/modelUsages
AuthorizationBearer <token>

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.

In: header

Path Parameters

agent*string

The unique identifier of the agent.

revision*string

The revision number, or * to aggregate across all revisions.

tenant*string

The tenant identifier

Query Parameters

environment?string

Optional environment slug to filter usages by.

Response Body

curl -X GET "https://api.fruxon.com/v1/tenants/string/agents/string/revisions/string/modelUsages"
[
  {
    "revision": 0,
    "modelId": "string",
    "providerId": "string",
    "inputTokens": 0,
    "outputTokens": 0,
    "cachedTokens": 0,
    "thinkingTokens": 0,
    "executionCount": 0,
    "inputCost": 0,
    "outputCost": 0,
    "totalCost": 0
  }
]
Empty
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}