{"uid":"cap_gjCtN8PxAUXHSsFZLjU41","slug":"nomos-budget-check-api-b395ebe8","name":"Nomos Budget Check API","description":"Machine-payable service intelligence for discovering, verifying, and monitoring identity, risk, authorization, execution-preflight, and evidence APIs before autonomous agents spend.","url":"https://base-agent-preflight.bytoken2023.workers.dev/x402/v1/policy/budget-check","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"queryParams":{"type":"object","required":["agent_id","currency","requested_amount","remaining_budget","per_transaction_limit","purpose"],"properties":{"purpose":{"type":"string","pattern":"^[A-Za-z0-9._:-]{2,120}$","description":"Purpose code for the requested spend."},"agent_id":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Caller-defined agent or principal id."},"currency":{"enum":["USDC","USDT","USD"],"type":"string","description":"Policy currency."},"idempotency_key":{"type":"string","maxLength":128,"description":"Optional idempotency key for deterministic decision replay."},"remaining_budget":{"type":"string","pattern":"^[0-9]+(?:\\.[0-9]{1,6})?$","description":"Remaining budget available to this agent."},"requested_amount":{"type":"string","pattern":"^[0-9]+(?:\\.[0-9]{1,6})?$","description":"Requested spend amount."},"per_transaction_limit":{"type":"string","pattern":"^[0-9]+(?:\\.[0-9]{1,6})?$","description":"Maximum amount allowed in one transaction."},"auto_approval_threshold":{"type":"string","pattern":"^[0-9]+(?:\\.[0-9]{1,6})?$","description":"Optional amount above which REVIEW is required even when budget fits."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"network":{"type":"string"},"product":{"type":"string"},"activity":{"type":"object"},"identity":{"type":"object"},"assessment":{"type":"object"},"provenance":{"type":"object"}}}}}}},"responseSchema":{"type":"json","example":{"network":"eip155:8453","product":"nomos-budget-check","assessment":{"flags":[],"risk_level":"low","risk_score":0}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_KV1KDI9q4bYAvUbcF160D","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates whether an autonomous agent has sufficient budget and authorization to proceed with a requested spend, returning a risk assessment and approval decision.","exampleAgentPrompt":"Before my agent 'trading-bot-42' executes this purchase, run a budget-check: it's requesting 5.00 USDC for purpose 'market:buy', has 120.00 USDC remaining, and a per-transaction limit of 10.00 USDC — flag it if risk is anything above low.","exampleUseCases":[{"title":"Pre-spend guard for DeFi trading agent","prompt":"Before agent 'defi-agent-01' swaps tokens, check if its 8.50 USDC requested spend is within policy — it has 200.00 USDC remaining budget and a per-transaction limit of 15.00 USDC, purpose is 'defi:swap', currency USDC."},{"title":"Expense approval for enterprise AI agent fleet","prompt":"Our enterprise agent 'procurement-agent-corp' wants to spend 450.00 USDC on 'vendor:invoice-pay' — check if it's within budget given 1000.00 remaining and a 500.00 per-transaction limit, and flag for review if it exceeds 400.00."},{"title":"Micro-payment risk assessment for API-calling agent","prompt":"Agent 'api-scraper-99' is about to pay 0.02 USDC for an API call (purpose: 'api:data-fetch'), with 5.00 USDC left in its budget and a 0.50 per-transaction cap — confirm it's low risk and approved."}],"resultDescription":"Returns a JSON object containing a risk_score (numeric), risk_level (e.g. 'low', 'medium', 'high'), a flags array listing any policy violations or concerns, and metadata including the product name and network identifier (e.g. 'eip155:8453' for Base). If the request exceeds the auto_approval_threshold or per_transaction_limit, the assessment will indicate a REVIEW or DENY decision.","failureModes":["Missing required query parameters (agent_id, currency, requested_amount, remaining_budget, per_transaction_limit, purpose) returns a 400 validation error","Invalid parameter format (e.g. agent_id with special characters, non-numeric amount) rejected by pattern validation","Payment of $0.02 USDC not received results in 402 Payment Required response","Idempotency key collision may return cached prior decision rather than fresh evaluation","Requested amount exceeding per_transaction_limit returns high risk or DENY flag","Service unavailability on Cloudflare Workers edge returns 503"],"whenToPreferThis":"Use this endpoint when an autonomous agent needs a lightweight, pay-per-use preflight authorization check before executing a financial transaction, particularly when enforcing per-transaction limits, remaining budget constraints, and risk thresholds in USDC/USDT/USD. Prefer this over static rule engines when you need a dynamic risk score with flag-level detail. Best suited for agentic systems on Base/EVM chains already integrated with x402 payment infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:03:01.828Z","isFirstParty":false}