Gets aggregated cost for a specific agent revision or all revisions.
Returns cost information including total input/output costs, token usage, and execution count. Use `*` as the revision parameter to aggregate costs across all revisions.
Authorization
Bearer JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.
In: header
Path Parameters
The unique identifier of the agent.
The revision number, or * to aggregate across all revisions.
The tenant identifier
Query Parameters
Optional environment slug to filter costs by.
Execution origin to roll up. Defaults to PRODUCTION — existing
dashboards see no behavior change after draft tests start landing in
the cost ledger. Pass TEST for developer test spend.
"PRODUCTION""UNSPECIFIED" | "PRODUCTION" | "TEST"Response Body
curl -X GET "https://api.fruxon.com/v1/tenants/string/agents/string/revisions/string/cost"{
"agentId": "string",
"revision": 0,
"inputCost": 0,
"outputCost": 0,
"totalCost": 0,
"executionCount": 0,
"inputTokens": 0,
"outputTokens": 0
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}Lists an agent's revisions, newest first.
One summary per revision: its number, comment, author (`createdBy`, plus the authoring tool as `actor`) and creation time; `isCurrent` on the revision executions run; and `lastDeployedAt`, the last successful deploy that made it current according to `GET .../revisions/deploys` (null for a first revision, which goes live at creation without a deploy). Definitions are not included — fetch one with `GET .../revisions/{revision}`. The unsaved draft is not a revision and is never listed. Paged; `totalCount` is always set.
Gets the agent revision cost summed across every environment.
Use `*` as the revision parameter to aggregate across all revisions. Cost buckets with no LLM usage are omitted from the response; the `executions` buckets are independent and surface failures that occurred before any LLM call. Each `executions` bucket also carries the run credits drawn in it — zero for `TEST` origin, which bills nothing.