# Preflight402 Dependency Existence Checker

> Preflight402 Dependency Existence Checker is a paid API for AI agents from preflight402.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Checks whether npm, PyPI, or crates package names actually exist in their registries and returns closest real alternatives for hallucinated (non-existent) package names.

## Facts

- Endpoint: POST https://preflight402.com/v1/deps/check
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/preflight402-dependency-existence-checker-14d7ab53
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_sTGv8Vw-pGVP3hbwhfhxh

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability preflight402-dependency-existence-checker-14d7ab53 -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "packages": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 214,
    "minLength": 1
   },
   "maxItems": 20,
   "minItems": 1
  },
  "ecosystem": {
   "enum": [
    "npm",
    "pypi",
    "crates"
   ],
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/preflight402-dependency-existence-checker-14d7ab53/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from preflight402.com](https://www.zero.xyz/host/preflight402.com/llms.txt)
