{"uid":"cap_3ese0MaSPnBiFxqaDiWpy","slug":"agent-buyer-identity-preflight-x402-purchase-governance-indexed-chain-b7483428","name":"Agent Buyer Identity Preflight | x402 Purchase Governance (Indexed Chain Query)","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/v1/x402/chain/indexed-query-preflight","method":"GET","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":["GET"],"type":"string"},"queryParams":{"type":"object","required":["chain","query_type"],"properties":{"chain":{"type":"string","pattern":"^[A-Za-z0-9:_ -]{2,80}$","description":"Requested chain or CAIP-2 network label."},"query_type":{"enum":["schema","event_logs","transfers","balances","transactions","sql","protocol_timeline"],"type":"string","description":"Indexed data query family."},"estimated_rows":{"type":"string","pattern":"^[0-9]{1,10}$","description":"Caller-estimated row count or result size."},"max_price_usdc":{"type":"string","pattern":"^[0-9]+(?:\\.[0-9]{1,6})?$","description":"Maximum acceptable query price."}}}},"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":"indexed-chain-query-preflight","assessment":{"flags":[],"risk_level":"low","risk_score":0}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_WOenh6ZM3QgBV941Hcmae","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Verifies whether an AI agent's buyer identity is authorized to purchase an indexed blockchain data query, checking role fit, price limits, sensitivity, and approval policy before the x402 payment is made.","exampleAgentPrompt":"Before buying that indexed balances query on Base (eip155:8453) via x402, run a preflight check to make sure my agent is authorized — the query type is 'balances', I'm estimating about 500 rows, and my max price is 0.10 USDC.","exampleUseCases":[{"title":"Pre-purchase governance for transfers query","prompt":"Before my agent pays for a transfers query on the Base network via x402, can you run a preflight to check if it's approved? Estimated rows are around 1000 and my max price is 0.05 USDC."},{"title":"Risk screening before SQL dataset purchase","prompt":"I want to make sure my agent isn't flagged before it buys an indexed SQL query on Ethereum — run the buyer identity preflight for query type 'sql', estimating 200 rows, with a max price of 0.20 USDC."},{"title":"Policy check for protocol timeline data","prompt":"Check whether my agent is cleared to purchase a protocol_timeline query on Base before we commit to the x402 payment — query type is 'protocol_timeline', estimated 50 rows, max acceptable price is 0.08 USDC."}],"resultDescription":"A JSON object containing the network identifier (e.g. 'eip155:8453'), product name, buyer identity details, activity profile, provenance record, and a risk assessment with a numeric risk score (0–1), a risk level label (e.g. 'low'), and any raised flags. A low risk score with empty flags indicates the agent buyer is cleared to proceed with the x402 purchase.","failureModes":["Missing required query parameters (chain, query_type) returns a 400 validation error","Chain identifier not matching expected CAIP-2 pattern returns a pattern validation error","Unknown or unsupported query_type enum value returns a schema error","Buyer identity not resolvable or flagged returns a high risk_level with populated flags array","Downstream governance policy service unavailable returns a 502 or timeout","Price ceiling exceeded by the assessed query cost may produce a risk flag"],"whenToPreferThis":"Use this endpoint when an AI agent is about to make an x402 micropayment for an indexed blockchain data query and you need to perform governance checks — verifying buyer role fitness, price acceptability, data sensitivity, and policy approval — before committing funds. Prefer this over generic identity checks when the purchase specifically involves indexed chain data (balances, transfers, event logs, transactions, SQL, schema, or protocol_timeline) on a supported EVM-compatible network. It is particularly valuable in automated agent pipelines where purchases must be pre-screened to prevent unauthorized or policy-violating spend.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:45:06.473Z","isFirstParty":false}