agent-swarm.devagent-swarm.dev

Savings

Savings API endpoints

GET/api/savings/daily

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Query Parameters

workflowId*string
Length1 <= length
days?string
Default"30"
Value in"7" | "30" | "90"
tier?string
Default"smart"
Value in"smol" | "regular" | "smart" | "ultra"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:3013/api/savings/daily?workflowId=string"
{
  "window": {
    "start": "string",
    "end": "string",
    "days": 0
  },
  "tier": "smol",
  "calibrationModel": "string",
  "calibratedAt": "string",
  "computedAt": "string",
  "valid": true,
  "reason": "no-runs",
  "points": [
    {
      "day": "string",
      "savingUsd": 0,
      "actualUsd": 0,
      "measuredUsd": 0,
      "estimatedLlmUsd": 0
    }
  ]
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET/api/savings/jobs

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Query Parameters

workflowId*string
Length1 <= length
days?string
Default"30"
Value in"7" | "30" | "90"
tier?string
Default"smart"
Value in"smol" | "regular" | "smart" | "ultra"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:3013/api/savings/jobs?workflowId=string"
{
  "window": {
    "start": "string",
    "end": "string",
    "days": 0
  },
  "tier": "smol",
  "calibrationModel": "string",
  "calibratedAt": "string",
  "computedAt": "string",
  "valid": true,
  "reason": "no-runs",
  "rows": [
    {
      "kind": "workflow",
      "workflowId": "string",
      "name": "string",
      "basis": "modelled",
      "runs": 0,
      "substitutedRuns": 0,
      "effectRuns": 0,
      "enabledOnlyRuns": 0,
      "capApplied": true,
      "opsPerRun": 0,
      "measuredUsd": 0,
      "estimatedLlmUsd": 0,
      "actualUsd": 0,
      "agentOnlyUsd": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "savingUsd": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "actualHours": 0,
      "agentOnlyHours": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "hoursSaved": {
        "p10": 0,
        "p50": 0,
        "p90": 0
      },
      "agentOnlyUsdPerRun": 0
    }
  ]
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}