{"openapi":"3.1.0","info":{"title":"Financial Schedule Stress API","version":"1.0.0","description":"Stress-test caller-supplied loan payments, cashflow streams, interest rates, and payout milestones. Inflows are delayed by 7, 14, and 30 days while contractual outflows stay on their dates. The calculation is in memory and is not a lending decision. 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 JSON matching the requestBody. Invalid input returns 400 with no payment challenge.\n2. A valid unpaid call returns 402 with the exact amount and payTo.\n3. Pay and retry with payment-signature. Payment settles only if the operation returns 2xx. A 4xx/5xx is not charged.\nInclude an Idempotency-Key header of 64 hex characters from 32 random bytes. Reuse that key only for retries of the same operation and request body.\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/fintech/schedule-risk-audit":{"post":{"operationId":"audit_financial_schedule_stress","summary":"Audit financial schedule stress","description":"Stress-test a caller-supplied loan schedule, cashflow stream, and payout list. Inflows move 7, 14, and 30 days later, outflows stay on their dates, and financing cost uses the supplied annual rate. The math stays in memory. This is not a credit decision.","tags":["fintech"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currency":{"type":"string","minLength":3,"maxLength":8},"opening_balance":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"minimum_balance":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"annual_rate":{"type":"number","minimum":0,"maximum":1},"payments":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amount":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"direction":{"type":"string","enum":["in","out"]},"label":{"type":"string","minLength":1,"maxLength":80}},"required":["date","amount"],"additionalProperties":false}},"cashflows":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amount":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"direction":{"type":"string","enum":["in","out"]},"label":{"type":"string","minLength":1,"maxLength":80}},"required":["date","amount"],"additionalProperties":false}},"milestones":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amount":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"direction":{"type":"string","enum":["in","out"]},"label":{"type":"string","minLength":1,"maxLength":80}},"required":["date","amount"],"additionalProperties":false}}},"additionalProperties":false},"example":{"currency":"USD","opening_balance":500,"minimum_balance":0,"annual_rate":0.1,"payments":[{"date":"2026-04-10","amount":800,"direction":"out","label":"loan installment"}],"cashflows":[{"date":"2026-04-01","amount":900,"direction":"in","label":"customer receipt"}],"milestones":[{"date":"2026-04-20","amount":200,"direction":"in","label":"payout"}]}}}},"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":{"default_risk_score":{"type":"number"},"volatility_index":{"type":"number"},"stress_test_scenarios":{"type":"object","properties":{"delay_7_days":{"type":"object","properties":{"delayed_days":{"type":"number"},"trough_balance":{"type":"number"},"ending_balance":{"type":"number"},"shortfall":{"type":"number"},"interest_cost":{"type":"number"},"failed":{"type":"boolean"}},"additionalProperties":true},"delay_14_days":{"type":"object","properties":{"delayed_days":{"type":"number"},"trough_balance":{"type":"number"},"ending_balance":{"type":"number"},"shortfall":{"type":"number"},"interest_cost":{"type":"number"},"failed":{"type":"boolean"}},"additionalProperties":true},"delay_30_days":{"type":"object","properties":{"delayed_days":{"type":"number"},"trough_balance":{"type":"number"},"ending_balance":{"type":"number"},"shortfall":{"type":"number"},"interest_cost":{"type":"number"},"failed":{"type":"boolean"}},"additionalProperties":true}},"additionalProperties":true},"audit_receipt":{"type":"string"}},"additionalProperties":true},"example":{"default_risk_score":49,"volatility_index":27,"stress_test_scenarios":{"delay_7_days":{"delayed_days":7,"trough_balance":500,"ending_balance":797.89,"shortfall":0,"interest_cost":2.11,"failed":false},"delay_14_days":{"delayed_days":14,"trough_balance":-300,"ending_balance":795.78,"shortfall":300,"interest_cost":4.22,"failed":true},"delay_30_days":{"delayed_days":30,"trough_balance":-300,"ending_balance":790.96,"shortfall":300,"interest_cost":9.04,"failed":true}},"audit_receipt":"sha256:e5040999007f098829dfcf9841769ac98501b5783d82cc6e541fe85f927fa01b"}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object: x402Version, resource with the operation description, accepts with the price and network, and extensions.bazaar with the input schema, input example, output schema, and output example."},"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 before settlement, so no payment is taken. Reuse the same idempotency key to retrieve the stored error without paying again."},"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":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}