{"uid":"cap_TI052caBS9Vv_ZmrfQKdw","slug":"x402-doctor-preflight-check-ed08610b","name":"x402 Doctor Preflight Check","description":"Is this x402 endpoint safe to pay? Check it before your AI agent pays: go / caution / no_go, the recommended payment option, and why (payment would fail, over your budget, price above advertised, not HTTPS, unknown token). Never pays the endpoint. Cached 10 min.","url":"https://x402-doctor.onrender.com/api/v1/preflight?utm_source=zero.xyz","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":["url"],"properties":{"url":{"type":"string","description":"The x402 endpoint you are about to pay."},"method":{"enum":["GET","POST"],"type":"string","description":"HTTP method you will call it with. Default: try GET, then POST."},"max_usd":{"type":"string","description":"Your budget per call in USD; above it the verdict is no_go."},"network":{"type":"string","description":"CAIP-2 network you want to pay on, e.g. eip155:8453 or solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["url","verdict","safe_to_pay","summary","options","reasons"],"properties":{"url":{"type":"string"},"cached":{"type":"boolean"},"method":{"type":["string","null"]},"options":{"type":"array","items":{"type":"object","required":["index","payable","problems"],"properties":{"usd":{"type":["number","null"]},"index":{"type":"integer"},"amount":{"type":["string","null"]},"pay_to":{"type":["string","null"]},"network":{"type":["string","null"]},"payable":{"type":"boolean"},"problems":{"type":"array","items":{"type":"string"}},"asset_symbol":{"type":["string","null"]},"network_name":{"type":["string","null"]}}}},"reasons":{"type":"array","items":{"type":"object","required":["level","code","message"],"properties":{"code":{"type":"string"},"level":{"enum":["no_go","caution","info"],"type":"string"},"message":{"type":"string"}}}},"signals":{"type":"object"},"summary":{"type":"string"},"verdict":{"enum":["go","caution","no_go"],"type":"string"},"checked_at":{"type":"string"},"safe_to_pay":{"type":"boolean"},"recommended_option":{"type":["integer","null"]}}}}}}},"responseSchema":{"type":"json","example":{"url":"https://ichimoku-signal.onrender.com/signal/BTC-USDT","cached":false,"method":"GET","options":[{"usd":0.02,"index":0,"amount":"20000","pay_to":"0x6B0F4651eD42893ab58139938175E4a69f175F25","network":"eip155:8453","payable":true,"problems":[],"asset_symbol":"USDC","network_name":"Base"}],"reasons":[],"signals":{"https":true,"advertised_price_usd":0.02,"listed_in_cdp_bazaar":false},"summary":"OK to pay: $0.02 on Base.","verdict":"go","checked_at":"2026-09-23T17:00:00.000Z","safe_to_pay":true,"recommended_option":0}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Enq2bHzo0-9RBK4xrBgpk","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates an x402 payment endpoint before paying it, returning a go/caution/no_go verdict with the recommended payment option and detailed reasons","exampleAgentPrompt":"Before I pay that x402 endpoint at https://someapi.example.com/data, run a preflight check on it with a max budget of $0.05 and tell me if it's safe to pay on the Base network (eip155:8453).","exampleUseCases":[{"title":"Budget guard before agent pays API","prompt":"Check whether the x402 endpoint at https://api.example.com/weather is safe to pay — my max budget per call is $0.02 and I want to pay on Base (eip155:8453). Give me a go or no-go before my agent sends any money."},{"title":"Spot-check unknown paid endpoint","prompt":"I found a new x402 API at https://unknown-service.io/summarize and I'm not sure it's legit. Can you run a preflight check on it with a GET request and tell me if it's using HTTPS, what token it wants, and whether I should trust it?"},{"title":"Verify price matches advertised rate","prompt":"Someone told me an x402 endpoint at https://data-provider.io/prices charges $0.001 per call, but I want to confirm before I integrate it. Can you do a preflight check and flag it if the actual price is higher than advertised?"}],"resultDescription":"Returns a verdict ('go', 'caution', or 'no_go'), a safe_to_pay boolean, a human-readable summary, a recommended payment option index, an array of payment options (each with USD cost, network, token symbol, pay-to address, and a list of problems), and a reasons array with severity levels ('no_go', 'caution', 'info') and machine-readable codes explaining the decision. Results are cached for 10 minutes.","failureModes":["Target URL is unreachable or returns non-402 status — endpoint reports it cannot inspect the payment challenge","Target endpoint uses an unknown or unsupported token — flagged as 'unknown token' reason with no_go verdict","Budget (max_usd) is below the endpoint's price — verdict becomes no_go with over-budget reason","Endpoint is not served over HTTPS — flagged as a no_go safety issue","Malformed or missing x402 payment headers at the target — diagnosis shows format errors in reasons","x402 Doctor itself may be temporarily unavailable on the Render free tier (cold start latency or downtime)"],"whenToPreferThis":"Use this endpoint whenever an AI agent is about to make a payment to an x402-enabled API and needs a safety check first — especially when the endpoint is unfamiliar, budget constraints matter, or you need to confirm token/network compatibility before committing funds. It is the right choice when you want a non-paying diagnostic that surfaces price mismatches, HTTPS issues, and unknown tokens before any transaction occurs. Prefer it over blindly calling the target endpoint when operating in automated pipelines where a bad payment could waste funds or expose the agent to fraudulent endpoints.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-14T00:30:37.502Z","isFirstParty":false,"canonicalSlug":"x402-doctor-preflight-check-ed08610b"}