{"uid":"cap_sTGv8Vw-pGVP3hbwhfhxh","slug":"preflight402-dependency-existence-checker-14d7ab53","name":"Preflight402 Dependency Existence Checker","description":"Call before installing packages suggested by a language model. Returns, for each npm or PyPI package name, whether it actually exists in the registry, whether it is deprecated or yanked, and — when the name is not found — the closest real package names. Catches hallucinated dependencies (slopsquatting) before an agent installs them. Never inspects package contents and never returns a safety verdict.","url":"https://preflight402.com/v1/deps/check","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"packages":{"type":"array","items":{"type":"string","maxLength":214,"minLength":1},"maxItems":20,"minItems":1},"ecosystem":{"enum":["npm","pypi","crates"],"type":"string"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_UgpFZlGwqiZB7ekbZJX4a","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Checks whether npm, PyPI, or crates package names actually exist in their registries and returns closest real alternatives for hallucinated (non-existent) package names.","exampleAgentPrompt":"Before you run pip install, check whether these Python packages actually exist in PyPI: 'requests', 'langchain', 'anthropic-sdk', and 'pydanticv2' — flag any that are hallucinated or deprecated and suggest the real names if something looks wrong.","exampleUseCases":[{"title":"LLM code suggestion safety check","prompt":"I just had an AI write me a requirements.txt with these packages: 'openai', 'tiktoken', 'langchian', 'faiss-cpu', and 'chromadb'. Can you check each one against PyPI to see which are real and which might be hallucinated, and give me the correct names for any that don't exist?"},{"title":"Node.js agent dependency validation","prompt":"Before my agent runs npm install on this package list — 'express', 'lodash', 'axois', 'dotenv', 'zod' — verify they all actually exist in the npm registry and aren't deprecated, and flag anything suspicious."},{"title":"Catch slopsquatted Rust crates","prompt":"An LLM generated a Cargo.toml with these crate names: 'serde', 'tokio', 'reqwest', 'asynch-std', and 'rayon'. Check them against crates.io and tell me which ones are real, which are yanked, and suggest the right names for any that seem made up."}],"resultDescription":"For each submitted package name, the agent receives: whether the package exists in the specified registry, whether it is deprecated or yanked, and — for non-existent packages — a list of the closest real package names as alternatives. No safety verdict or code analysis is included.","failureModes":["Package name exceeds 214 characters — rejected with validation error","More than 20 packages submitted in a single call — rejected with validation error","Invalid ecosystem value (not npm, pypi, or crates) — rejected with validation error","Registry API unavailable — may return error or timeout","Empty packages array — rejected with validation error","Payment not provided or insufficient — 402 payment required response"],"whenToPreferThis":"Use this endpoint when an AI agent or workflow has generated a list of package dependencies and you need to verify their existence before installation, especially to catch hallucinated (slopsquatted) package names. Prefer this over manual registry searches when processing up to 20 packages at once in an automated pipeline. It does not analyze package contents or security vulnerabilities — for those concerns, use a dedicated security scanner after confirming existence.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:31:03.470Z","isFirstParty":false}