# BRAINIAC Cloud FinOps Cost Anomaly Detection

> BRAINIAC Cloud FinOps Cost Anomaly Detection is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.04/call, status unknown (last checked 2026-11-17).

Analyzes cloud cost time-series data to detect statistically significant spending anomalies using z-score analysis, returning flagged dates, scores, and per-service summaries.

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/cloud-finops/cost-anomaly-detect?utm_source=zero.xyz
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-cloud-finops-cost-anomaly-detection-8986b92c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_at3u9iGt-cmV5MyDl0V1q

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability brainiac-cloud-finops-cost-anomaly-detection-8986b92c -d '<json body>'
```

Example prompt: Can you scan my cloud cost data for the past 30 days and flag any days where spending looked anomalous? Here's the daily breakdown by service in CSV format — costs are in USD.

## When to prefer this

Choose this endpoint when you need fast, stateless statistical anomaly detection on cloud cost data without connecting a live cloud account. It is ideal for agents that already have cost data exported (CSV or structured rows) and need a cheap ($0.04/call), no-account-required z-score analysis. Prefer alternatives if you need root-cause diagnosis, live cloud account integration, savings recommendations, or native provider export format support.

## Known failure modes

- Input CSV or rows missing required fields (date, service, cost, currency) — validation error
- Date strings not matching ISO 8601 format — schema validation failure
- CSV or rows array exceeds size limits (5000 rows, 200KB CSV) — request rejected
- Insufficient data points per service to compute meaningful z-scores — low statistical confidence
- Currency code not matching 3-letter ISO pattern — validation error
- Payment not received or insufficient USDC — 402 Payment Required before processing

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

Returns a JSON object with a top-level status ('ok' or 'anomalies'), a series array with per-currency stats (mean, stdev, days analyzed) and a list of anomalous dates with their z-scores, plus findings explaining the detection method, a checkedAt timestamp, and a limitations array clarifying scope (no live cloud connection, z-score threshold of 3, brainiac-billing-v1 format only).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "csv": {
   "type": "string",
   "maxLength": 200000,
   "minLength": 1
  },
  "file": {
   "type": "object",
   "required": [
    "mediaType",
    "fileBase64"
   ],
   "properties": {
    "filename": {
     "type": "string",
     "maxLength": 180,
     "minLength": 1
    },
    "mediaType": {
     "enum": [
      "text/csv",
      "text/plain"
     ],
     "type": "string"
    },
    "fileBase64": {
     "type": "string",
     "maxLength": 12000000,
     "minLength": 1
    }
   },
   "additionalProperties": false
  },
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "date",
     "service",
     "cost",
     "currency"
    ],
    "properties": {
     "cost": {
      "type": "number",
      "maximum": 1000000000000,
      "minimum": -1000000000000
     },
     "date": {
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
     },
     "tags": {
      "type": "array",
      "items": {
       "type": "object",
       "required": [
        "key",
        "value"
       ],
       "properties": {
        "key": {
         "type": "string",
         "maxLength": 80,
         "minLength": 1
        },
        "value": {
         "type": "string",
         "maxLength": 200,
         "minLength": 1
        }
       },
       "additionalProperties": false
      },
      "maxItems": 20
     },
     "region": {
      "type": "string",
      "maxLength": 80,
      "minLength": 1
     },
     "account": {
      "type": "string",
      "maxLength": 80,
      "minLength": 1
     },
     "service": {
      "type": "string",
      "maxLength": 120,
      "minLength": 1
     },
     "currency": {
      "type": "string",
      "pattern": "^[A-Za-z]{3}$"
     },
     "usageUnit": {
      "type": "string",
      "maxLength": 40,
      "minLength": 1
     },
     "resourceId": {
      "type": "string",
      "maxLength": 200,
      "minLength": 1
     },
     "resourceType": {
      "type": "string",
      "maxLength": 80,
      "minLength": 1
     },
     "usageQuantity": {
      "type": "number",
      "maximum": 1000000000000,
      "minimum": 0
     }
    },
    "additionalProperties": false
   },
   "maxItems": 5000
  },
  "currency": {
   "type": "string",
   "pattern"
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "series": [
   {
    "days": 15,
    "mean": 22.666667,
    "stdev": 49.057789,
    "status": "anomalies",
    "currency": "USD",
    "anomalies": [
     {
      "cost": 200,
      "date": "2026-01-15",
      "zScore": 3.6148
     }
    ]
   }
  ],
  "status": "anomalies",
  "findings": [
   {
    "code": "anomaly_method",
    "kind": "extracted",
    "detail": "USD uses a sample z-score. Mean 22.666667, sample standard deviation 49.057789. A day is flagged when the absolute z-score is at least 3."
   }
  ],
  "checkedAt": "2026-11-02T19:00:00.000Z",
  "limitations": [
   "No cloud account was connected and no infrastructure was changed.",
   "Costs and forecasts use only figures supplied in the request.",
   "Provider list prices are not added, and no saving is claimed without a supplied cost.",
   "The billing format is brainiac-billing-v1. Native provider exports are not accepted.",
   "An anomaly is a daily total whose sample z-score is at least 3. It is not a root-cause diagnosis."
  ],
  "accountConnected": false,
  "infrastructureChanged": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-cloud-finops-cost-anomaly-detection-8986b92c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
