{"openapi":"3.1.0","info":{"title":"Advisory spending check","version":"1.0.0","description":"Compare a proposed downstream cost with caller-supplied limits and history. Advisory only: does not authenticate policy, reserve funds, issue authorization or block external API calls. Evaluation excludes this service fee."},"servers":[{"url":"https://agents.getardaro.com"}],"paths":{"/v1/agent-utilities/budget-check/analyze":{"post":{"operationId":"authorize_agent_spend","summary":"Compare a proposed downstream cost with caller-supplied limits and history. Advisory only: does not authenticate policy, reserve funds, issue authorization or block external API calls. Evaluation excludes this service fee.","x-price-usdc":"0.10","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"proposed_cost":{"type":"string","minLength":1,"maxLength":16,"pattern":"^(?:0|[1-9][0-9]{0,8})(?:\\.[0-9]{1,6})?(?![\\s\\S])"},"currency":{"type":"string","enum":["USD","USDC"]},"policy":{"type":"object","properties":{"currency":{"type":"string","enum":["USD","USDC"]},"max_per_transaction":{"type":"string","minLength":1,"maxLength":16,"pattern":"^(?:0|[1-9][0-9]{0,8})(?:\\.[0-9]{1,6})?(?![\\s\\S])"},"max_per_hour":{"type":"string","minLength":1,"maxLength":16,"pattern":"^(?:0|[1-9][0-9]{0,8})(?:\\.[0-9]{1,6})?(?![\\s\\S])"},"max_checks_per_minute":{"type":"integer","minimum":1,"maximum":1000000}},"required":["currency","max_per_transaction","max_per_hour","max_checks_per_minute"],"additionalProperties":false},"history":{"type":"object","properties":{"currency":{"type":"string","enum":["USD","USDC"]},"committed_last_hour":{"type":"string","minLength":1,"maxLength":16,"pattern":"^(?:0|[1-9][0-9]{0,8})(?:\\.[0-9]{1,6})?(?![\\s\\S])"},"pending_reserved":{"type":"string","minLength":1,"maxLength":16,"pattern":"^(?:0|[1-9][0-9]{0,8})(?:\\.[0-9]{1,6})?(?![\\s\\S])"},"checks_last_minute":{"type":"integer","minimum":0,"maximum":1000000}},"required":["currency","committed_last_hour","pending_reserved","checks_last_minute"],"additionalProperties":false}},"required":["proposed_cost","currency","policy","history"],"additionalProperties":false}}}},"responses":{"200":{"description":"Settled advisory analysis; human review required.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["contract_version","service_id","status","result","identities"],"properties":{"contract_version":{"const":"ardaro.agent-utilities.response.v1"},"service_id":{"const":"ardaro.authorize_agent_spend"},"status":{"const":"review_required"},"result":{"type":"object","properties":{"tool":{"const":"authorize_agent_spend"},"authorization_status":{"enum":["WITHIN_SUBMITTED_LIMITS","EXCEEDS_SUBMITTED_LIMITS","RATE_THRESHOLD_EXCEEDED","CURRENCY_MISMATCH"]},"currency":{"type":"string","enum":["USD","USDC"]},"policy_currency":{"type":"string","enum":["USD","USDC"]},"history_currency":{"type":"string","enum":["USD","USDC"]},"proposed_cost":{"type":"string","minLength":8,"maxLength":18,"pattern":"^(?:0|[1-9][0-9]{0,10})\\.[0-9]{6}(?![\\s\\S])"},"submitted_budget_in_use":{"anyOf":[{"type":"string","minLength":8,"maxLength":18,"pattern":"^(?:0|[1-9][0-9]{0,10})\\.[0-9]{6}(?![\\s\\S])"},{"type":"null"}]},"proposed_hour_total":{"anyOf":[{"type":"string","minLength":8,"maxLength":18,"pattern":"^(?:0|[1-9][0-9]{0,10})\\.[0-9]{6}(?![\\s\\S])"},{"type":"null"}]},"hourly_remaining_after_proposal":{"anyOf":[{"type":"string","minLength":8,"maxLength":18,"pattern":"^(?:0|[1-9][0-9]{0,10})\\.[0-9]{6}(?![\\s\\S])"},{"type":"null"}]},"checks":{"type":"object","properties":{"currency_consistent":{"type":"boolean"},"transaction_within_limit":{"type":["boolean","null"]},"hourly_within_limit":{"type":["boolean","null"]},"rate_within_limit":{"type":"boolean"}},"required":["currency_consistent","transaction_within_limit","hourly_within_limit","rate_within_limit"],"additionalProperties":false},"findings":{"type":"array","maxItems":3,"uniqueItems":true,"items":{"enum":["CURRENCY_MISMATCH","TRANSACTION_LIMIT_EXCEEDED","HOURLY_LIMIT_EXCEEDED","RATE_THRESHOLD_EXCEEDED"]}},"policy":{"type":"object","properties":{"advisory_only":{"const":true},"stateless":{"const":true},"submitted_records_retained":{"const":false},"caller_identity_authenticated":{"const":false},"submitted_evidence_verified":{"const":false},"external_spend_enforced":{"const":false},"downstream_payment_authorized":{"const":false},"reservation_created":{"const":false},"ledger_updated":{"const":false},"credentials_issued":{"const":false},"delivery_verified":{"const":false},"model_calls":{"const":0},"human_review_required":{"const":true},"policy_authenticated":{"const":false},"history_verified":{"const":false},"checks_exclude_service_fee":{"const":true},"scope":{"const":"Compares caller-supplied downstream maximum cost with caller-supplied limits and history. A within-limits result is not authorization, a reservation, or evidence that actual spend is controlled."},"fee_scope":{"const":"The separately quoted service fee is excluded from these checks and must be budgeted separately in USDC. No USD/USDC conversion is performed."},"history_scope":{"const":"The caller supplies committed cost for its intended rolling-hour window, all unresolved pending reservations, and the count of prior checks in its intended minute. Completeness and timing are not verified."}},"required":["advisory_only","stateless","submitted_records_retained","caller_identity_authenticated","submitted_evidence_verified","external_spend_enforced","downstream_payment_authorized","reservation_created","ledger_updated","credentials_issued","delivery_verified","model_calls","human_review_required","policy_authenticated","history_verified","checks_exclude_service_fee","scope","fee_scope","history_scope"],"additionalProperties":false}},"required":["tool","authorization_status","currency","policy_currency","history_currency","proposed_cost","submitted_budget_in_use","proposed_hour_total","hourly_remaining_after_proposal","checks","findings","policy"],"additionalProperties":false},"identities":{"type":"object","additionalProperties":false,"required":["analysis_result_identity","payment_identity"],"properties":{"analysis_result_identity":{"type":"string","pattern":"^res_[0-9a-f]{64}(?![\\s\\S])"},"payment_identity":{"type":"object","additionalProperties":false,"required":["protocol","reference","replayed"],"properties":{"protocol":{"const":"x402-v2"},"reference":{"type":"string","pattern":"^pay_[0-9a-f]{64}(?![\\s\\S])"},"replayed":{"type":"boolean"}}}}}}}}},"headers":{"PAYMENT-RESPONSE":{"description":"Base64 x402 settlement receipt; validate exact route, currency, amount and payee.","schema":{"type":"string"}}}},"402":{"description":"Payment required; no analysis result returned.","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string","contentEncoding":"base64"}}}},"400":{"description":"Invalid request, unavailable dependency or conflicting payment; no new analysis result released."},"409":{"description":"Invalid request, unavailable dependency or conflicting payment; no new analysis result released."},"413":{"description":"Invalid request, unavailable dependency or conflicting payment; no new analysis result released."},"415":{"description":"Invalid request, unavailable dependency or conflicting payment; no new analysis result released."},"503":{"description":"Invalid request, unavailable dependency or conflicting payment; no new analysis result released."},"504":{"description":"Invalid request, unavailable dependency or conflicting payment; no new analysis result released."}}}},"/v1/agent-utilities/budget-check/status":{"get":{"responses":{"200":{"description":"Free cached readiness and terms."}}}},"/v1/agent-utilities/budget-check/example":{"get":{"responses":{"200":{"description":"Fixed free synthetic input and result."}}}}}}