FruxonDocs
AgentsBudget

Forecast an agent's spend to the end of the month.

The UTC calendar month so far, day by day, and where it is likely to land in dollars and in credits, with a range. Read from the last four weeks with their day-of-week shape, across every revision. Without an environment the dollars are read against the agent-wide monthly budget, and the response says when a busy stretch could reach it.

GET
/v1/tenants/{tenant}/agents/{agent}/costForecast
AuthorizationBearer <token>

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

In: header

Path Parameters

agent*string

Agent identifier.

tenant*string

The tenant identifier

Query Parameters

origin?string

Which traffic to project. Defaults to PRODUCTION.

Default"PRODUCTION"
Value in"UNSPECIFIED" | "PRODUCTION" | "TEST"
environment?string

One environment's slug, or omit for the whole agent.

Response Body

curl -X GET "https://api.fruxon.com/v1/tenants/string/agents/string/costForecast"
{
  "monthStartMs": 0,
  "resetsAtMs": 0,
  "days": [
    {
      "dayStartMs": 0,
      "cost": 0,
      "credits": 0
    }
  ],
  "cost": {
    "spent": 0,
    "budget": 0,
    "atMonthEnd": {
      "low": 0,
      "likely": 0,
      "high": 0
    },
    "days": [
      {
        "dayStartMs": 0,
        "atMs": 0,
        "low": 0,
        "likely": 0,
        "high": 0
      }
    ],
    "basis": {
      "paceDays": 0,
      "weeklyPattern": false,
      "weekdayFactors": [
        0
      ],
      "dailyRate": 0
    },
    "budgetReachedEarliestAtMs": 0
  },
  "credits": {
    "spent": 0,
    "budget": 0,
    "atMonthEnd": {
      "low": 0,
      "likely": 0,
      "high": 0
    },
    "days": [
      {
        "dayStartMs": 0,
        "atMs": 0,
        "low": 0,
        "likely": 0,
        "high": 0
      }
    ],
    "basis": {
      "paceDays": 0,
      "weeklyPattern": false,
      "weekdayFactors": [
        0
      ],
      "dailyRate": 0
    },
    "budgetReachedEarliestAtMs": 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
}