{"uid":"cap_qbsKZuQLoYLdF-hca9wuq","slug":"x402-doctor-preflight-check-92fc6dd5","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.fizzl.eu/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"]},"method":{"type":["string","null"],"description":"MPP payment method (evm, tempo, stripe); absent for x402 options"},"pay_to":{"type":["string","null"]},"network":{"type":["string","null"]},"payable":{"type":"boolean"},"problems":{"type":"array","items":{"type":"string"}},"protocol":{"enum":["x402","mpp","l402"],"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":null,"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_D-GkyIr5y68TIeVzcb4fJ","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":"Pre-flight safety check for an x402 payment endpoint — returns go/caution/no_go verdict, recommended payment option, and reasons before your agent pays anything","exampleAgentPrompt":"Before you pay that x402 endpoint at https://some-api.example.com/data, run a preflight check on it with my budget of $0.05 — tell me if it's safe to pay and which payment option you'd recommend.","exampleUseCases":[{"title":"Budget guard for autonomous agent","prompt":"Before my agent pays anything at https://ai-service.example.com/generate, check if it's safe — my max budget per call is $0.02 and I want to pay on the Base network (eip155:8453)."},{"title":"HTTPS and token legitimacy check","prompt":"Can you verify that this x402 endpoint https://data-api.xyz/premium is using HTTPS and a recognized token before I let my agent call it?"},{"title":"Advertised price mismatch detection","prompt":"I was told this endpoint https://api.coolservice.io/search costs $0.001 per call — can you do a preflight check to make sure the actual price matches what was advertised before my agent pays?"}],"resultDescription":"Returns a JSON object with: a verdict enum (go, caution, or no_go), a safe_to_pay boolean, a human-readable summary, an array of payment options each with USD cost, network, asset symbol, payable status, and any problems found, a recommended_option index, and a reasons array with level (no_go/caution/info), code, and message for each issue detected. Results are cached for 10 minutes.","failureModes":["URL is missing or malformed — returns error without verdict","Target endpoint is unreachable — may surface as caution or no_go with connectivity reason","x402 header parsing failure if target returns malformed 402 response","Budget exceeded — verdict is no_go with over_budget reason code","Non-HTTPS endpoint — verdict is no_go with reason code for missing HTTPS","Unknown or unsupported token — flagged as caution or no_go"],"whenToPreferThis":"Use this endpoint whenever an AI agent is about to make an x402 payment and needs a safe, non-paying preflight check first. It is specifically designed for the x402 protocol and understands CAIP-2 networks, USD budget limits, HTTPS requirements, and known token validation — making it far more appropriate than a generic HTTP probe or manual inspection. Prefer this over the sibling debug endpoint when you want a quick go/no-go decision rather than a deep diagnostic of a broken endpoint.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T21:37:33.406Z","isFirstParty":false,"canonicalSlug":"x402-doctor-preflight-check-92fc6dd5"}