{"uid":"cap_UetpDiRWmhrPZXeqdJXLT","slug":"brainiac-covenant-headroom-calculator-472e88c5","name":"BRAINIAC Covenant Headroom Calculator","description":"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.","url":"https://www.brainiac.software/api/v1/fintech/covenant-headroom-calculate?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"metrics":{"type":"array","items":{"type":"object","required":["id","name","value"],"properties":{"id":{"type":"string","maxLength":120,"minLength":1},"name":{"type":"string","maxLength":120,"minLength":1},"value":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991}},"additionalProperties":false},"maxItems":200,"minItems":1},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"covenants":{"type":"array","items":{"type":"object","required":["id","metric_id","operator","threshold"],"properties":{"id":{"type":"string","maxLength":120,"minLength":1},"name":{"type":"string","maxLength":200,"minLength":1},"operator":{"enum":["gte","lte","gt","lt"],"type":"string"},"metric_id":{"type":"string","maxLength":120,"minLength":1},"threshold":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991}},"additionalProperties":false},"maxItems":200,"minItems":1}}},"responseSchema":{"type":"json","example":{"summary":{"breached":0,"covenants":2,"tightest_headroom":30},"currency":"USD","covenants":[{"name":"Max leverage","breached":false,"evidence":["headroom = threshold 350 - metric 320 = 30; breach if value > threshold"],"headroom":30,"operator":"lte","metric_id":"leverage","threshold":350,"covenant_id":"c1","metric_name":"Net leverage","metric_value":320,"breach_threshold_value":350},{"name":"Min interest cover","breached":false,"evidence":["headroom = metric 250 - threshold 200 = 50; breach if value < threshold"],"headroom":50,"operator":"gte","metric_id":"interest_cover","threshold":200,"covenant_id":"c2","metric_name":"Interest cover","metric_value":250,"breach_threshold_value":200}],"explanations":["For gte/gt covenants, headroom = metric_value - threshold. For lte/lt, headroom = threshold - metric_value.","breach_threshold_value is the contractual threshold itself. No credit bureau or ledger is contacted."]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.04","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.04/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_h5WsoIPXvZnCQwXsHmpxA","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.04","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates compliance headroom and breach status for financial debt covenants against supplied metric values","exampleAgentPrompt":"Check my covenant compliance: I have two covenants — a max leverage covenant (lte 350) tied to my leverage metric currently at 320, and a min interest cover covenant (gte 200) tied to my interest cover metric currently at 250. Currency is USD. Tell me headroom and whether anything is breached.","exampleUseCases":[{"title":"Quarterly loan covenant compliance check","prompt":"Run a covenant headroom check for our quarterly lender report — our leverage ratio is 320 against a max covenant of 350 (lte), and our interest cover is 250 against a minimum covenant of 200 (gte). Currency is USD. Tell me the headroom on each and which is tightest."},{"title":"Automated breach alert before debt drawdown","prompt":"Before we draw down on the credit facility, check if our covenants are still met: EBITDA coverage metric is 180 with a minimum threshold of 150 (gte), and net debt to EBITDA is 420 with a maximum of 500 (lte). Flag any breaches and show headroom in USD."},{"title":"PE portfolio company covenant monitoring","prompt":"I need to monitor covenant headroom across two portfolio companies. Company A has a leverage covenant (lte 400, current value 390) and an interest cover covenant (gte 150, current value 160). Currency GBP. What's the tightest headroom and are any covenants breached?"}],"resultDescription":"Returns a JSON object with a summary (total covenants, breach count, tightest headroom value), a currency label, and a detailed per-covenant breakdown including headroom amount, breach status, operator, threshold, actual metric value, and an evidence string explaining the headroom calculation logic.","failureModes":["Missing required fields (metrics array or covenants array) returns a validation error","metric_id in a covenant does not match any supplied metric id — covenant may be unresolvable","Integer values outside safe JavaScript integer range are rejected","Currency code not matching 3-letter uppercase pattern fails schema validation","Empty arrays for metrics or covenants (minItems:1 violated) return a schema error","Supplying more than 200 metrics or covenants exceeds maxItems and is rejected"],"whenToPreferThis":"Use this endpoint when you need deterministic, auditable covenant headroom calculations without connecting to any credit bureau, ledger, or external data source — all metric values and thresholds are caller-supplied. Prefer this over building custom covenant logic when you need clear evidence strings explaining each calculation, support for gte/lte/gt/lt operators, and a tightest-headroom summary across many covenants in a single call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-14T18:34:11.857Z","isFirstParty":false,"canonicalSlug":"brainiac-covenant-headroom-calculator-472e88c5"}