{"openapi":"3.1.0","info":{"title":"Cloud FinOps API","version":"1.0.0","description":"Parse brainiac-billing-v1 charges, score daily cost anomalies, allocate spend, and forecast from the supplied export. No cloud account is connected. Paid with x402 exact USDC on Base. No account is required.","contact":{"email":"support@brainiac.software"},"x-guidance":"BRAINIAC.software is a pay-per-call API for software agents. No account or API key is required.\nPayment uses the x402 protocol with exact USDC on Base (chain id 8453). Each POST operation has a fixed USD price.\nHow to call an operation:\n1. POST a JSON body matching the operation's requestBody schema to the operation path. Include an Idempotency-Key header (64 hex characters, 32 random bytes).\n2. If you have not paid, the server responds 402 with payment requirements in the body. Pay the exact amount to the payTo address on Base.\n3. Retry the identical request with the same Idempotency-Key and add a payment-signature header containing the x402 payment payload. On success (200) the operation result is returned.\n4. Reuse the same Idempotency-Key only for retries of the same operation and request body; it will not be charged twice.\nAll outputs are compliance prechecks, drafts, or data lookups for human review. They are not official determinations, legal advice, identity confirmation, or certified filings. Verify time-sensitive or official data with the cited source before acting."},"servers":[{"url":"https://www.brainiac.software"}],"paths":{"/api/v1/cloud-finops/billing-csv-parse":{"post":{"operationId":"parse_a_billing_csv","summary":"Parse a billing CSV","description":"Read brainiac-billing-v1 CSV or JSON charges. Required columns are date, service, cost, and currency. Native cloud-provider exports are rejected.","tags":["cloud-finops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/csv","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"rows":{"maxItems":5000,"type":"array","items":{"type":"object","properties":{"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])))$"},"service":{"type":"string","minLength":1,"maxLength":120},"region":{"type":"string","minLength":1,"maxLength":80},"account":{"type":"string","minLength":1,"maxLength":80},"resourceId":{"type":"string","minLength":1,"maxLength":200},"resourceType":{"type":"string","minLength":1,"maxLength":80},"usageQuantity":{"type":"number","minimum":0,"maximum":1000000000000},"usageUnit":{"type":"string","minLength":1,"maxLength":40},"cost":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"tags":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["key","value"],"additionalProperties":false}}},"required":["date","service","cost","currency"],"additionalProperties":false}}},"additionalProperties":false},"example":{"csv":"date,service,cost,currency,tags\n2026-01-01,compute,10,USD,team=platform\n2026-01-02,storage,5,USD,\n"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"accountConnected":{"type":"boolean"},"infrastructureChanged":{"type":"boolean"},"format":{"type":"string"},"status":{"type":"string"},"currencies":{"type":"array","items":{"type":"string"}},"rowCount":{"type":"number"},"rows":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"service":{"type":"string"},"region":{"type":"string"},"account":{"type":"string"},"resourceId":{"type":"string"},"resourceType":{"type":"string"},"usageQuantity":{"type":"null"},"usageUnit":{"type":"string"},"cost":{"type":"number"},"currency":{"type":"string"},"tags":{"type":"string"}},"additionalProperties":true}},"findings":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-02T19:00:00.000Z","accountConnected":false,"infrastructureChanged":false,"format":"brainiac-billing-v1","status":"parsed","currencies":["USD"],"rowCount":2,"rows":[{"date":"2026-01-01","service":"compute","region":"","account":"","resourceId":"","resourceType":"","usageQuantity":null,"usageUnit":"","cost":10,"currency":"USD","tags":"team=platform"},{"date":"2026-01-02","service":"storage","region":"","account":"","resourceId":"","resourceType":"","usageQuantity":null,"usageUnit":"","cost":5,"currency":"USD","tags":""}],"findings":[],"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{}}]}}},"/api/v1/cloud-finops/cost-anomaly-detect":{"post":{"operationId":"detect_cost_anomalies","summary":"Detect cost anomalies","description":"Score daily totals with a sample z-score. A day is flagged when the absolute z-score is at least 3 and at least 8 days were supplied. Fewer days are not scored.","tags":["cloud-finops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/csv","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"rows":{"maxItems":5000,"type":"array","items":{"type":"object","properties":{"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])))$"},"service":{"type":"string","minLength":1,"maxLength":120},"region":{"type":"string","minLength":1,"maxLength":80},"account":{"type":"string","minLength":1,"maxLength":80},"resourceId":{"type":"string","minLength":1,"maxLength":200},"resourceType":{"type":"string","minLength":1,"maxLength":80},"usageQuantity":{"type":"number","minimum":0,"maximum":1000000000000},"usageUnit":{"type":"string","minLength":1,"maxLength":40},"cost":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"tags":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["key","value"],"additionalProperties":false}}},"required":["date","service","cost","currency"],"additionalProperties":false}},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"}},"additionalProperties":false},"example":{"csv":"date,service,cost,currency\n2026-01-01,compute,10,USD\n2026-01-02,compute,10,USD\n2026-01-03,compute,10,USD\n2026-01-04,compute,10,USD\n2026-01-05,compute,10,USD\n2026-01-06,compute,10,USD\n2026-01-07,compute,10,USD\n2026-01-08,compute,10,USD\n2026-01-09,compute,10,USD\n2026-01-10,compute,10,USD\n2026-01-11,compute,10,USD\n2026-01-12,compute,10,USD\n2026-01-13,compute,10,USD\n2026-01-14,compute,10,USD\n2026-01-15,compute,200,USD\n"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"accountConnected":{"type":"boolean"},"infrastructureChanged":{"type":"boolean"},"status":{"type":"string"},"series":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"status":{"type":"string"},"days":{"type":"number"},"mean":{"type":"number"},"stdev":{"type":"number"},"anomalies":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"cost":{"type":"number"},"zScore":{"type":"number"}},"additionalProperties":true}}},"additionalProperties":true}},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-02T19:00:00.000Z","accountConnected":false,"infrastructureChanged":false,"status":"anomalies","series":[{"currency":"USD","status":"anomalies","days":15,"mean":22.666667,"stdev":49.057789,"anomalies":[{"date":"2026-01-15","cost":200,"zScore":3.6148}]}],"findings":[{"kind":"extracted","code":"anomaly_method","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."}],"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/cloud-finops/spend-breakdown":{"post":{"operationId":"break_down_cloud_spend","summary":"Break down cloud spend","description":"Sum supplied charges by service, region, account, or a tag. When groupBy is omitted, charges are grouped by service. Currencies are not converted.","tags":["cloud-finops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/csv","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"rows":{"maxItems":5000,"type":"array","items":{"type":"object","properties":{"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])))$"},"service":{"type":"string","minLength":1,"maxLength":120},"region":{"type":"string","minLength":1,"maxLength":80},"account":{"type":"string","minLength":1,"maxLength":80},"resourceId":{"type":"string","minLength":1,"maxLength":200},"resourceType":{"type":"string","minLength":1,"maxLength":80},"usageQuantity":{"type":"number","minimum":0,"maximum":1000000000000},"usageUnit":{"type":"string","minLength":1,"maxLength":40},"cost":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"tags":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["key","value"],"additionalProperties":false}}},"required":["date","service","cost","currency"],"additionalProperties":false}},"groupBy":{"type":"string","enum":["service","region","account"]},"tagKey":{"type":"string","minLength":1,"maxLength":80}},"additionalProperties":false},"example":{"rows":[{"date":"2026-01-15","service":"compute","cost":100,"currency":"USD"},{"date":"2026-02-15","service":"compute","cost":110,"currency":"USD"},{"date":"2026-03-15","service":"storage","cost":120,"currency":"USD"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"accountConnected":{"type":"boolean"},"infrastructureChanged":{"type":"boolean"},"status":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"key":{"type":"string"},"cost":{"type":"number"},"share":{"type":"number"}},"additionalProperties":true}},"trend":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"status":{"type":"string"},"previousMonth":{"type":"string"},"latestMonth":{"type":"string"},"previousCost":{"type":"number"},"latestCost":{"type":"number"},"change":{"type":"number"}},"additionalProperties":true}},"groupedBy":{"type":"string"},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-02T19:00:00.000Z","accountConnected":false,"infrastructureChanged":false,"status":"grouped","groups":[{"currency":"USD","key":"compute","cost":210,"share":0.636364},{"currency":"USD","key":"storage","cost":120,"share":0.363636}],"trend":[{"currency":"USD","status":"compared","previousMonth":"2026-02","latestMonth":"2026-03","previousCost":110,"latestCost":120,"change":10}],"groupedBy":"service","findings":[{"kind":"extracted","code":"no_fx","detail":"Currencies are not converted."}],"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{}}]}}},"/api/v1/cloud-finops/idle-resource-detect":{"post":{"operationId":"detect_idle_compute","summary":"Detect idle compute","description":"Mark compute idle only when daysObserved meets the supplied minimum and cpuPercent is below the supplied threshold. Missing CPU is not treated as idle.","tags":["cloud-finops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"resources":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string","minLength":1,"maxLength":200},"resourceType":{"type":"string","minLength":1,"maxLength":80},"daysObserved":{"type":"integer","minimum":0,"maximum":3660},"cpuPercent":{"type":"number","minimum":0,"maximum":100},"cost":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"}},"required":["resourceId","resourceType","daysObserved"],"additionalProperties":false}},"cpuThreshold":{"type":"number","minimum":0,"maximum":100},"minimumDays":{"type":"integer","minimum":1,"maximum":3660}},"required":["resources"],"additionalProperties":false},"example":{"cpuThreshold":5,"minimumDays":14,"resources":[{"resourceId":"i-idle","resourceType":"compute","daysObserved":14,"cpuPercent":2,"cost":40,"currency":"USD"},{"resourceId":"i-unknown","resourceType":"compute","daysObserved":14,"cost":40,"currency":"USD"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"accountConnected":{"type":"boolean"},"infrastructureChanged":{"type":"boolean"},"status":{"type":"string"},"resources":{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"status":{"type":"string"},"cpuPercent":{"type":"number"},"daysObserved":{"type":"number"},"suppliedCost":{"type":"number"},"currency":{"type":"string"}},"additionalProperties":true}},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-02T19:00:00.000Z","accountConnected":false,"infrastructureChanged":false,"status":"idle_observed","resources":[{"resourceId":"i-idle","status":"idle","cpuPercent":2,"daysObserved":14,"suppliedCost":40,"currency":"USD"},{"resourceId":"i-unknown","status":"insufficient","cpuPercent":null,"daysObserved":14,"suppliedCost":40,"currency":"USD"}],"findings":[{"kind":"extracted","code":"idle_rule","detail":"Compute is idle only when daysObserved is at least 14 and cpuPercent is below the supplied threshold 5. Missing CPU is not treated as idle."}],"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/cloud-finops/unused-storage-detect":{"post":{"operationId":"detect_unused_storage","summary":"Detect unused storage","description":"Mark a volume unused only when the supplied days meet minimumDays and the volume is unattached or usedGb is 0. Attachment alone is not usage.","tags":["cloud-finops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"volumes":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string","minLength":1,"maxLength":200},"storageGb":{"type":"number","minimum":0,"maximum":1000000000},"usedGb":{"type":"number","minimum":0,"maximum":1000000000},"attached":{"type":"boolean"},"daysObserved":{"type":"integer","minimum":0,"maximum":3660},"cost":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"}},"required":["resourceId","daysObserved"],"additionalProperties":false}},"minimumDays":{"type":"integer","minimum":1,"maximum":3660}},"required":["volumes"],"additionalProperties":false},"example":{"minimumDays":7,"volumes":[{"resourceId":"vol-free","attached":false,"daysObserved":10,"storageGb":100,"cost":8,"currency":"USD"},{"resourceId":"vol-unknown","attached":true,"daysObserved":10,"storageGb":100}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"accountConnected":{"type":"boolean"},"infrastructureChanged":{"type":"boolean"},"status":{"type":"string"},"volumes":{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"status":{"type":"string"},"suppliedCost":{"type":"number"},"currency":{"type":"string"}},"additionalProperties":true}},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-02T19:00:00.000Z","accountConnected":false,"infrastructureChanged":false,"status":"unused_observed","volumes":[{"resourceId":"vol-free","status":"unused","suppliedCost":8,"currency":"USD"},{"resourceId":"vol-unknown","status":"insufficient","suppliedCost":null,"currency":""}],"findings":[{"kind":"extracted","code":"storage_rule","detail":"A volume is unused only when daysObserved is at least 7 and the request says it is unattached or usedGb is 0 with storage present. Missing usage is not treated as unused."}],"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/cloud-finops/compute-cost-compare":{"post":{"operationId":"compare_supplied_compute_prices","summary":"Compare supplied compute prices","description":"Multiply each supplied hourly price by the supplied hours. Options in different currencies are not converted, and no provider list price is added.","tags":["cloud-finops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"options":{"minItems":2,"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"hourlyPrice":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"hours":{"type":"number","minimum":0,"maximum":1000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"}},"required":["name","hourlyPrice","hours","currency"],"additionalProperties":false}}},"required":["options"],"additionalProperties":false},"example":{"options":[{"name":"a","hourlyPrice":0.1,"hours":720,"currency":"USD"},{"name":"b","hourlyPrice":0.08,"hours":720,"currency":"USD"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"accountConnected":{"type":"boolean"},"infrastructureChanged":{"type":"boolean"},"status":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"currency":{"type":"string"},"hourlyPrice":{"type":"number"},"hours":{"type":"number"},"cost":{"type":"number"}},"additionalProperties":true}},"lowerCost":{"type":"string"},"difference":{"type":"number"},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-02T19:00:00.000Z","accountConnected":false,"infrastructureChanged":false,"status":"compared","options":[{"name":"a","currency":"USD","hourlyPrice":0.1,"hours":720,"cost":72},{"name":"b","currency":"USD","hourlyPrice":0.08,"hours":720,"cost":57.6}],"lowerCost":"b","difference":14.4,"findings":[{"kind":"extracted","code":"compute_compared","detail":"b costs 14.4 less than the next supplied option for the supplied hours. The prices were supplied and are not a provider list."}],"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{}}]}}},"/api/v1/cloud-finops/monthly-cost-forecast":{"post":{"operationId":"forecast_monthly_cloud_cost","summary":"Forecast monthly cloud cost","description":"Fit a line through at least three supplied monthly totals, or multiply the average daily cost by the length of the next month when at least 14 days are supplied. Less history is not forecast.","tags":["cloud-finops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/csv","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"rows":{"maxItems":5000,"type":"array","items":{"type":"object","properties":{"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])))$"},"service":{"type":"string","minLength":1,"maxLength":120},"region":{"type":"string","minLength":1,"maxLength":80},"account":{"type":"string","minLength":1,"maxLength":80},"resourceId":{"type":"string","minLength":1,"maxLength":200},"resourceType":{"type":"string","minLength":1,"maxLength":80},"usageQuantity":{"type":"number","minimum":0,"maximum":1000000000000},"usageUnit":{"type":"string","minLength":1,"maxLength":40},"cost":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"tags":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["key","value"],"additionalProperties":false}}},"required":["date","service","cost","currency"],"additionalProperties":false}}},"additionalProperties":false},"example":{"rows":[{"date":"2026-01-15","service":"compute","cost":100,"currency":"USD"},{"date":"2026-02-15","service":"compute","cost":110,"currency":"USD"},{"date":"2026-03-15","service":"storage","cost":120,"currency":"USD"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"accountConnected":{"type":"boolean"},"infrastructureChanged":{"type":"boolean"},"status":{"type":"string"},"forecasts":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"status":{"type":"string"},"method":{"type":"string"},"forecast":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"detail":{"type":"string"}},"additionalProperties":true}},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-02T19:00:00.000Z","accountConnected":false,"infrastructureChanged":false,"status":"forecast","forecasts":[{"currency":"USD","status":"forecast","method":"monthly_line","forecast":130,"low":130,"high":130,"detail":"Ordinary least squares on 3 supplied monthly totals. The next month is point 4. The band is one residual standard deviation, not a probability."}],"findings":[{"kind":"extracted","code":"forecast_method","detail":"Ordinary least squares on 3 supplied monthly totals. The next month is point 4. The band is one residual standard deviation, not a probability."}],"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]}}},"/api/v1/cloud-finops/budget-variance-analyze":{"post":{"operationId":"analyze_budget_variance","summary":"Analyze budget variance","description":"Subtract the supplied budget from the supplied charges inside the period. Missing days stay uncovered and are not filled with zero from another currency.","tags":["cloud-finops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/csv","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"rows":{"maxItems":5000,"type":"array","items":{"type":"object","properties":{"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])))$"},"service":{"type":"string","minLength":1,"maxLength":120},"region":{"type":"string","minLength":1,"maxLength":80},"account":{"type":"string","minLength":1,"maxLength":80},"resourceId":{"type":"string","minLength":1,"maxLength":200},"resourceType":{"type":"string","minLength":1,"maxLength":80},"usageQuantity":{"type":"number","minimum":0,"maximum":1000000000000},"usageUnit":{"type":"string","minLength":1,"maxLength":40},"cost":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"tags":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["key","value"],"additionalProperties":false}}},"required":["date","service","cost","currency"],"additionalProperties":false}},"budget":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"periodStart":{"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])))$"},"periodEnd":{"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])))$"}},"required":["amount","currency","periodStart","periodEnd"],"additionalProperties":false}},"required":["budget"],"additionalProperties":false},"example":{"rows":[{"date":"2026-01-15","service":"compute","cost":100,"currency":"USD"},{"date":"2026-02-15","service":"compute","cost":110,"currency":"USD"},{"date":"2026-03-15","service":"storage","cost":120,"currency":"USD"}],"budget":{"amount":300,"currency":"USD","periodStart":"2026-01-01","periodEnd":"2026-03-31"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"accountConnected":{"type":"boolean"},"infrastructureChanged":{"type":"boolean"},"status":{"type":"string"},"currency":{"type":"string"},"actual":{"type":"number"},"budget":{"type":"number"},"variance":{"type":"number"},"coverageDays":{"type":"number"},"periodDays":{"type":"number"},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-02T19:00:00.000Z","accountConnected":false,"infrastructureChanged":false,"status":"partial","currency":"USD","actual":330,"budget":300,"variance":30,"coverageDays":3,"periodDays":90,"findings":[{"kind":"insufficient","code":"budget_partial","detail":"The period has 90 days and the charges cover 3. The variance uses only the supplied rows."},{"kind":"extracted","code":"budget_variance","detail":"Actual 330 minus budget 300 is 30 USD."}],"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{}}]}}},"/api/v1/cloud-finops/cost-allocation":{"post":{"operationId":"allocate_cloud_cost_by_tag","summary":"Allocate cloud cost by tag","description":"Group supplied charges by one tag key. Charges without that tag remain unallocated.","tags":["cloud-finops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/csv","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"rows":{"maxItems":5000,"type":"array","items":{"type":"object","properties":{"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])))$"},"service":{"type":"string","minLength":1,"maxLength":120},"region":{"type":"string","minLength":1,"maxLength":80},"account":{"type":"string","minLength":1,"maxLength":80},"resourceId":{"type":"string","minLength":1,"maxLength":200},"resourceType":{"type":"string","minLength":1,"maxLength":80},"usageQuantity":{"type":"number","minimum":0,"maximum":1000000000000},"usageUnit":{"type":"string","minLength":1,"maxLength":40},"cost":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"tags":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["key","value"],"additionalProperties":false}}},"required":["date","service","cost","currency"],"additionalProperties":false}},"tagKey":{"type":"string","minLength":1,"maxLength":80}},"required":["tagKey"],"additionalProperties":false},"example":{"tagKey":"team","rows":[{"date":"2026-01-01","service":"compute","cost":70,"currency":"USD","tags":[{"key":"team","value":"platform"}]},{"date":"2026-01-02","service":"compute","cost":30,"currency":"USD"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"accountConnected":{"type":"boolean"},"infrastructureChanged":{"type":"boolean"},"status":{"type":"string"},"tagKey":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"tag":{"type":"string"},"cost":{"type":"number"},"share":{"type":"number"}},"additionalProperties":true}},"unallocated":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"cost":{"type":"number"},"share":{"type":"number"}},"additionalProperties":true}},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-02T19:00:00.000Z","accountConnected":false,"infrastructureChanged":false,"status":"allocated","tagKey":"team","groups":[{"currency":"USD","tag":"platform","cost":70,"share":0.7}],"unallocated":[{"currency":"USD","cost":30,"share":0.3}],"findings":[{"kind":"extracted","code":"allocation_rule","detail":"Costs are grouped by the supplied tag team. Charges without that tag stay unallocated and were not assigned to a group."}],"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/cloud-finops/cost-optimization-report":{"post":{"operationId":"report_cloud_cost_evidence","summary":"Report cloud cost evidence","description":"Combine the supplied billing, usage, price, and budget checks. Recommendations repeat the evidence and the assumption. No account is connected and no resource is changed.","tags":["cloud-finops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/csv","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"rows":{"maxItems":5000,"type":"array","items":{"type":"object","properties":{"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])))$"},"service":{"type":"string","minLength":1,"maxLength":120},"region":{"type":"string","minLength":1,"maxLength":80},"account":{"type":"string","minLength":1,"maxLength":80},"resourceId":{"type":"string","minLength":1,"maxLength":200},"resourceType":{"type":"string","minLength":1,"maxLength":80},"usageQuantity":{"type":"number","minimum":0,"maximum":1000000000000},"usageUnit":{"type":"string","minLength":1,"maxLength":40},"cost":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"tags":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["key","value"],"additionalProperties":false}}},"required":["date","service","cost","currency"],"additionalProperties":false}},"resources":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string","minLength":1,"maxLength":200},"resourceType":{"type":"string","minLength":1,"maxLength":80},"daysObserved":{"type":"integer","minimum":0,"maximum":3660},"cpuPercent":{"type":"number","minimum":0,"maximum":100},"cost":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"}},"required":["resourceId","resourceType","daysObserved"],"additionalProperties":false}},"volumes":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string","minLength":1,"maxLength":200},"storageGb":{"type":"number","minimum":0,"maximum":1000000000},"usedGb":{"type":"number","minimum":0,"maximum":1000000000},"attached":{"type":"boolean"},"daysObserved":{"type":"integer","minimum":0,"maximum":3660},"cost":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"}},"required":["resourceId","daysObserved"],"additionalProperties":false}},"cpuThreshold":{"type":"number","minimum":0,"maximum":100},"minimumDays":{"type":"integer","minimum":1,"maximum":3660},"options":{"minItems":2,"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"hourlyPrice":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"hours":{"type":"number","minimum":0,"maximum":1000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"}},"required":["name","hourlyPrice","hours","currency"],"additionalProperties":false}},"budget":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"periodStart":{"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])))$"},"periodEnd":{"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])))$"}},"required":["amount","currency","periodStart","periodEnd"],"additionalProperties":false},"tagKey":{"type":"string","minLength":1,"maxLength":80},"groupBy":{"type":"string","enum":["service","region","account"]}},"additionalProperties":false},"example":{"rows":[{"date":"2026-01-15","service":"compute","cost":100,"currency":"USD"},{"date":"2026-02-15","service":"compute","cost":110,"currency":"USD"},{"date":"2026-03-15","service":"storage","cost":120,"currency":"USD"}],"resources":[{"resourceId":"i-idle","resourceType":"compute","daysObserved":14,"cpuPercent":2,"cost":40,"currency":"USD"}],"cpuThreshold":5,"minimumDays":14,"options":[{"name":"a","hourlyPrice":0.1,"hours":720,"currency":"USD"},{"name":"b","hourlyPrice":0.08,"hours":720,"currency":"USD"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"accountConnected":{"type":"boolean"},"infrastructureChanged":{"type":"boolean"},"summary":{"type":"string"},"sections":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}},"recommendations":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"resourceId":{"type":"string"},"evidence":{"type":"string"},"assumption":{"type":"string"},"suppliedCost":{"type":"number"},"currency":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-02T19:00:00.000Z","accountConnected":false,"infrastructureChanged":false,"summary":"The report uses only the supplied export and usage fields. No account was connected and no infrastructure was changed.","sections":[{"name":"billing","status":"parsed"},{"name":"anomalies","status":"insufficient"},{"name":"breakdown","status":"grouped"},{"name":"idle","status":"idle_observed"},{"name":"storage","status":"not_supplied"},{"name":"compare","status":"compared"},{"name":"forecast","status":"forecast"},{"name":"budget","status":"not_supplied"},{"name":"allocation","status":"not_supplied"}],"recommendations":[{"code":"idle_compute","resourceId":"i-idle","evidence":"CPU 2% across 14 supplied days.","assumption":"The resource stays idle only while CPU remains below the supplied threshold for the supplied window.","suppliedCost":40,"currency":"USD","detail":"The figure is the cost supplied for this resource, not a provider price."},{"code":"supplied_price_difference","resourceId":"b","evidence":"b costs 14.4 less than the next supplied option for the supplied hours. The prices were supplied and are not a provider list.","assumption":"The hours stay at the supplied figure and the supplied hourly prices do not change.","suppliedCost":14.4,"currency":"USD","detail":"The difference uses only the prices and hours in the request."}],"findings":[{"kind":"insufficient","code":"anomaly_insufficient","detail":"USD has 3 daily totals. A modified check needs at least 8 days, so no anomaly was scored."},{"kind":"extracted","code":"idle_rule","detail":"Compute is idle only when daysObserved is at least 14 and cpuPercent is below the supplied threshold 5. Missing CPU is not treated as idle."},{"kind":"extracted","code":"compute_compared","detail":"b costs 14.4 less than the next supplied option for the supplied hours. The prices were supplied and are not a provider list."}],"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.12"},"protocols":[{"x402":{}}]}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}