FruxonDocs
Agent NetworkGraph

The Application's production spend over an optional window, split by component, agent and model.

`totalCostUsd` and `creditsCharged` are the support KPIs' own figures. The split is read from the Application's run records: components are conversations, relevance checks, automations (any run a trigger fired), knowledge upkeep, review and other; `conversationCostUsd` and `conversationCredits` are the conversational components alone, for a cost per conversation without knowledge upkeep, reviews or automations. `creditsRefunded` counts credits handed back for superseded turns. A window reaching past the workspace's run history is split from `countedFromMs`. `from`/`to` are Unix ms (half-open), defaulting to the last 30 days; all time is `from=0`.

GET
/v1/tenants/{tenant}/networks/{network}/spend
AuthorizationBearer <token>

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

In: header

Path Parameters

network*string

The Application (Network) id.

Formatuuid
tenant*string

The tenant identifier

Query Parameters

from?integer

Window start, Unix ms inclusive. Defaults to 30 days before to; 0 for all time.

Formatint64
to?integer

Window end, Unix ms exclusive. Defaults to now.

Formatint64

Response Body

curl -X GET "https://api.fruxon.com/v1/tenants/string/networks/497f6eca-6276-4993-bfeb-53cbbbba6f08/spend"
{
  "networkId": "00000000-0000-0000-0000-000000000000",
  "window": {
    "fromMs": 0,
    "toMs": 0
  },
  "countedFromMs": 0,
  "totalCostUsd": 0,
  "creditsCharged": 0,
  "creditsRefunded": 0,
  "components": [
    {
      "component": "CONVERSATIONS",
      "costUsd": 0,
      "credits": 0,
      "runs": 0
    }
  ],
  "agents": [
    {
      "agentId": "string",
      "displayName": "string",
      "costUsd": 0,
      "credits": 0,
      "runs": 0
    }
  ],
  "models": [
    {
      "providerId": "string",
      "modelId": "string",
      "costUsd": 0,
      "inputTokens": 0,
      "outputTokens": 0
    }
  ],
  "conversationCostUsd": 0,
  "conversationCredits": 0
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
Empty
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}